Elementary Computer Applications- MCQs- Paper- 04- Topics:- Logic Gates

 

Elementary Computer Applications- MCQs- Paper- 04- 
Topics:- Logic Gates

 

1. Which gate is known as the basic building block of digital circuits?
A) NAND
B) NOR
C) AND
D) XOR
Answer: C) AND


2. The output of an AND gate is 1 when:
A) Any input is 1
B) All inputs are 1
C) Both inputs are 0
D) Only one input is 1
Answer: B) All inputs are 1


3. OR gate gives output 1 when:
A) All inputs are 0
B) At least one input is 1
C) Only one input is 0
D) All inputs are 1 only
Answer: B) At least one input is 1


4. NOT gate is also called:
A) Buffer
B) Inverter
C) Comparator
D) Converter
Answer: B) Inverter


5. NAND gate is combination of:
A) AND + OR
B) AND + NOT
C) OR + NOT
D) XOR + NOT
Answer: B) AND + NOT


6. NOR gate is combination of:
A) OR + NOT
B) AND + NOT
C) XOR + NOT
D) AND + OR
Answer: A) OR + NOT


7. Which gates are called universal gates?
A) AND, OR
B) XOR, XNOR
C) NAND, NOR
D) NOT, AND
Answer: C) NAND, NOR


8. XOR gate output is 1 when:
A) Inputs are same
B) Inputs are different
C) All inputs are 1
D) All inputs are 0
Answer: B) Inputs are different


9. XNOR gate output is 1 when:
A) Inputs are different
B) Inputs are same
C) One input is 1
D) One input is 0
Answer: B) Inputs are same


10. Truth table with output always opposite of input belongs to:
A) AND
B) OR
C) NOT
D) XOR
Answer: C) NOT


11. NAND gate output is 0 when:
A) Any input is 0
B) All inputs are 1
C) Both inputs are 0
D) Any input is 1
Answer: B) All inputs are 1


12. NOR gate output is 1 when:
A) Both inputs are 1
B) Any input is 1
C) All inputs are 0
D) One input is 0
Answer: C) All inputs are 0


13. Which gate is used for comparison?
A) XOR
B) AND
C) OR
D) NOT
Answer: A) XOR


14. How many inputs does a NOT gate have?
A) 2
B) 3
C) 1
D) 4
Answer: C) 1


15. Which gate produces output 0 only when both inputs are 0?
A) OR
B) AND
C) NAND
D) XOR
Answer: A) OR


16. Universal gate can implement:
A) Only AND
B) Only OR
C) Any logic function
D) Only NOT
Answer: C) Any logic function


17. XOR stands for:
A) Exclusive OR
B) Extra OR
C) Extended OR
D) External OR
Answer: A) Exclusive OR


18. Boolean expression for AND gate:
A) A + B
B) A · B
C) A'
D) A
B
Answer: B) A · B


19. Boolean expression for OR gate:
A) A + B
B) AB
C) A'
D) A
B
Answer: A) A + B


20. Bubble at output of gate symbol indicates:
A) Addition
B) Multiplication
C) Negation
D) Equality
Answer: C) Negation


21. Which gate is opposite of XOR?
A) AND
B) XNOR
C) NOR
D) NAND
Answer: B) XNOR


22. If inputs to AND gate are 1 and 0, output is:
A) 1
B) 0
C) Undefined
D) 2
Answer: B) 0


23. If inputs to OR gate are 0 and 0, output is:
A) 1
B) 0
C) Undefined
D) Depends
Answer: B) 0


24. NAND gate with both inputs tied together acts as:
A) OR
B) NOT
C) AND
D) XOR
Answer: B) NOT


25. NOR gate with both inputs tied together acts as:
A) NOT
B) AND
C) OR
D) XOR
Answer: A) NOT


Part B — Programming Languages (Machine, Assembly, HLL, 3GL, 4GL) — 25 MCQs


26. Machine language is written in:
A) English words
B) Binary digits
C) Symbols
D) Hex codes only
Answer: B) Binary digits


27. Machine language is directly understood by:
A) Compiler
B) Assembler
C) CPU
D) Interpreter
Answer: C) CPU


28. Assembly language uses:
A) Binary codes
B) Mnemonic codes
C) English sentences
D) Flowcharts
Answer: B) Mnemonic codes


29. Translator for assembly language is:
A) Compiler
B) Interpreter
C) Assembler
D) Loader
Answer: C) Assembler


30. Which is a high-level language?
A) Binary
B) Assembly
C) C
D) Opcode
Answer: C) C


31. High-level languages are closer to:
A) Machine
B) Human language
C) Hardware
D) Microcode
Answer: B) Human language


32. C language is an example of:
A) 2GL
B) 3GL
C) 4GL
D) 5GL
Answer: B) 3GL


33. SQL is example of:
A) 3GL
B) 4GL
C) 2GL
D) Assembly
Answer: B) 4GL


34. Which language is machine dependent?
A) C
B) Java
C) Assembly
D) Python
Answer: C) Assembly


35. Which language is machine independent?
A) Machine
B) Assembly
C) High-level
D) Opcode
Answer: C) High-level


36. Compiler translates:
A) Whole program at once
B) Line by line
C) Only errors
D) Hardware
Answer: A) Whole program at once


37. Interpreter translates:
A) Entire program
B) Line by line
C) Binary only
D) Assembly only
Answer: B) Line by line


38. Example of assembly instruction:
A) MOV A,B
B) printf()
C) SELECT
D) print()
Answer: A) MOV A,B


39. 3GL languages require:
A) Assembler
B) Compiler/Interpreter
C) Linker only
D) Loader only
Answer: B) Compiler/Interpreter


40. Which is NOT a 3GL language?
A) C++
B) Java
C) Python
D) SQL
Answer: D) SQL


41. Which is a 4GL feature?
A) Hardware control
B) Low level coding
C) Query based
D) Binary format
Answer: C) Query based


42. Machine language programs are:
A) Easy to write
B) Error free
C) Hard to debug
D) Portable
Answer: C) Hard to debug


43. Assembly language is also called:
A) Symbolic language
B) Natural language
C) Query language
D) Script language
Answer: A) Symbolic language


44. Which language is fastest in execution?
A) Python
B) Java
C) Machine language
D) SQL
Answer: C) Machine language


45. 4GL languages are mainly used for:
A) System programming
B) Device drivers
C) Database queries
D) Microcode
Answer: C) Database queries


46. Java belongs to:
A) 3GL
B) 4GL
C) 2GL
D) Machine
Answer: A) 3GL


47. Which is not a translator?
A) Compiler
B) Interpreter
C) Assembler
D) Editor
Answer: D) Editor


48. Assembly language is easier than machine language because:
A) Uses binary
B) Uses mnemonics
C) Uses hardware
D) Uses circuits
Answer: B) Uses mnemonics


49. 4GL reduces:
A) Execution speed
B) Development time
C) Hardware cost
D) Memory
Answer: B) Development time


50. Example of 4GL tool:
A) C
B) Java
C) SQL
D) Assembly
Answer: C) SQL

============================================================= 

Post a Comment

0 Comments