0% found this document useful (0 votes)
4 views55 pages

Unit_2

The document outlines key topics for an exam on Computer Organization and Architecture, including Number Systems, Error Detection, Alphanumeric Codes, and Gray Code. It provides sample questions and answers related to these topics, such as binary arithmetic, error correction codes, and character encoding. Each section includes explanations to reinforce understanding of the concepts.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views55 pages

Unit_2

The document outlines key topics for an exam on Computer Organization and Architecture, including Number Systems, Error Detection, Alphanumeric Codes, and Gray Code. It provides sample questions and answers related to these topics, such as binary arithmetic, error correction codes, and character encoding. Each section includes explanations to reinforce understanding of the concepts.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

Perfect!

From Unit 2: Computer Organization and Architecture, I’ll select the most important
and high-probability topics for your exam:

Selected Topics with High Probability:

1. Number Systems and Binary Arithmetic


(Conversions, Addition/Subtraction using 1’s and 2’s complement, Multiplication,
Division)

2. Error Detection and Correction Codes


(Parity Bit, Checksum, Hamming Code)

3. Alphanumeric Codes and Gray Code


(ASCII, EBCDIC, Excess-3, BCD, Gray to Binary and vice versa)

4. Memory Types and Microprocessor Basics


(RAM types, ROM types, Microprocessor history and basics)

5. Logic Gates and Digital Electronics


(Basic gates, Universal gates, DeMorgan’s Theorems, K-map simplifications)

6. Arithmetic Logic Unit (ALU)


(Half adder, Full adder, Binary adder, 2’s complement adder-subtractor)

Topic 1: Number Systems and Binary Arithmetic

1. What is the binary equivalent of the decimal number 45?


A) 101101
B) 110101
C) 100101
D) 111001

Answer: A
Explanation: 45 in decimal = 32 + 8 + 4 + 1 = 101101 in binary.

2. What is the octal equivalent of the binary number 110101?


A) 65
B) 54
C) 55
D) 64

Answer: B
Explanation: Group binary digits in 3’s from right: 110 101 = 6 5 in octal.

3. What is the hexadecimal equivalent of the binary number 11110010?


A) F2
B) E2
C) F4
D) D2

Answer: A
Explanation: Group binary digits in 4’s: 1111 = F, 0010 = 2 → F2.

4. What is the 1’s complement of the binary number 10101?


A) 01010
B) 10101
C) 11110
D) 00000

Answer: A
Explanation: 1’s complement is obtained by flipping all bits.

5. What is the 2’s complement of binary number 10101?


A) 01010
B) 01011
C) 10101
D) 10110

Answer: B
Explanation: 2’s complement = 1’s complement + 1 = 01010 + 1 = 01011.

6. What is the result of binary addition: 1011 + 1101?


A) 11000
B) 10100
C) 10110
D) 10000

Answer: A
Explanation: 1011 + 1101 = 11000 (with carry).

7. How is subtraction done using 2’s complement?


A) Add the minuend and 2’s complement of subtrahend
B) Add the minuend and 1’s complement of subtrahend
C) Direct subtraction of bits
D) Add minuend and subtrahend

Answer: A
Explanation: Subtraction is performed by adding 2’s complement of subtrahend to minuend.

8. Convert decimal -7 to 4-bit 2’s complement binary number.


A) 1001
B) 1111
C) 1000
D) 1001

Answer: D
Explanation: Binary 7 = 0111, 1’s complement = 1000, add 1 → 1001.

9. What is the result of 2’s complement subtraction: 1101 - 1001?


A) 0100
B) 1010
C) 0011
D) 0110

Answer: A
Explanation: Convert subtraction to addition: 1101 + 2’s complement of 1001 (0111) = 1101 +
0111 = 10100 (ignore carry) = 0100.

10. What is the decimal equivalent of hexadecimal number 1A?


A) 16
B) 26
C) 31
D) 12

Answer: B
Explanation: 1A = (1 * 16) + (10) = 26 decimal.

11. Which of the following is the binary representation of octal number 37?
A) 11111
B) 11101
C) 11011
D) 10111

Answer: A
Explanation: Octal 3 = 011, 7 = 111 → 011111 = 11111.

12. What is the binary result of multiplying 101 and 11?


A) 1111
B) 11111
C) 1011
D) 1100

Answer: B
Explanation: 101 (5 decimal) × 11 (3 decimal) = 15 decimal = 11111 binary.

13. What is the decimal result of binary division: 1100 ÷ 10?


A) 6
B) 4
C) 3
D) 2

Answer: C
Explanation: 1100 (12 decimal) ÷ 10 (2 decimal) = 6 decimal = 110 binary.

14. Which number system is also called base-16?


A) Octal
B) Binary
C) Decimal
D) Hexadecimal

Answer: D
Explanation: Hexadecimal is base-16 number system.

15. What is the decimal equivalent of binary 100101?


A) 37
B) 35
C) 39
D) 33

Answer: A
Explanation: (132)+(016)+(08)+(14)+(02)+(11)= 32+4+1=37.

16. What is the output of adding 1’s complement of 1101 and binary 1010?
A) 0111
B) 1001
C) 0101
D) 1111

Answer: A
Explanation: 1’s complement of 1101 = 0010; 0010 + 1010 = 1100 (carry ignored) = 0111.

17. Which arithmetic operation is easier using 2’s complement notation?


A) Multiplication
B) Subtraction
C) Division
D) Addition

Answer: B
Explanation: 2’s complement simplifies subtraction by converting it to addition.

18. How many bits are required to represent decimal number 255 in binary?
A) 6
B) 7
C) 8
D) 9

Answer: C
Explanation: 255 = 11111111 in binary → 8 bits.

19. What is the purpose of using complement systems in binary arithmetic?


A) To simplify multiplication
B) To simplify subtraction
C) To simplify division
D) To simplify addition

Answer: B
Explanation: Complements (1’s and 2’s) simplify subtraction operations.

20. Which method is used for subtraction in binary arithmetic?


A) Borrowing method
B) 1’s complement method
C) 2’s complement method
D) All of the above

Answer: D
Explanation: Subtraction in binary can be done via borrowing or complement methods; 2’s
complement is most common.

Topic 2: Error Detection and Correction Codes

1. Which error detection method adds an extra bit to data to make the number of 1s either
even or odd?
A) Checksum
B) Parity Bit
C) Hamming Code
D) CRC

Answer: B
Explanation: Parity bit adds a single bit to make total 1s count even (even parity) or odd (odd
parity).
2. In even parity, what should be the parity bit if the data bits are 1011?
A) 0
B) 1
C) 2
D) None

Answer: A
Explanation: Number of 1s = 3 (odd), parity bit must be 1 to make total 1s even.

3. Which error detection method divides data into segments and adds all segments to detect
errors?
A) Parity Bit
B) Checksum
C) Hamming Code
D) Cyclic Redundancy Check (CRC)

Answer: B
Explanation: Checksum divides data into equal segments and sums them to detect errors.

4. The Hamming code is mainly used for:


A) Error detection only
B) Error correction only
C) Both error detection and correction
D) Data compression

Answer: C
Explanation: Hamming code can detect and correct single-bit errors.

5. Which code corrects errors by adding redundant bits at specific positions?


A) Parity code
B) Checksum
C) Hamming code
D) Gray code

Answer: C
Explanation: Hamming code places parity bits at powers of two positions for error correction.
6. Which method is most suitable for detecting burst errors?
A) Parity Bit
B) Checksum
C) Hamming Code
D) Cyclic Redundancy Check (CRC)

Answer: D
Explanation: CRC is highly effective for burst error detection.

7. In Hamming code, how many parity bits are needed for 4 data bits?
A) 2
B) 3
C) 4
D) 5

Answer: B
Explanation: Number of parity bits p satisfies 2^p ≥ m + p + 1, for m=4 → p=3.

8. What does the parity bit in even parity ensure?


A) Total number of 1s is odd
B) Total number of 1s is even
C) Total number of 0s is even
D) None of the above

Answer: B
Explanation: Even parity means total 1s including parity bit is even.

9. Which of the following is NOT an error detection code?


A) Parity bit
B) Checksum
C) Hamming code
D) ASCII

Answer: D
Explanation: ASCII is a character encoding scheme, not an error detection method.
10. Checksum method is commonly used in:
A) Computer memory
B) Network communication
C) Database indexing
D) CPU arithmetic

Answer: B
Explanation: Checksum is widely used in network protocols for error detection.

11. What is the main disadvantage of parity bit method?


A) Cannot detect even number of errors
B) Cannot detect odd number of errors
C) Requires large extra bits
D) Complex calculation

Answer: A
Explanation: Parity bit fails to detect errors if an even number of bits are wrong.

12. Which is the correct statement about Hamming code?


A) It detects two-bit errors and corrects one-bit error
B) It detects and corrects all errors
C) It detects one-bit error only
D) It cannot detect any error

Answer: A
Explanation: Hamming code can detect two-bit errors but correct only one-bit errors.

13. What is the role of redundant bits in error correction codes?


A) Data compression
B) Error detection and correction
C) Data encryption
D) Increase transmission speed

Answer: B
Explanation: Redundant bits help detect and correct errors.
14. Which of the following codes is a linear block code?
A) Parity bit code
B) Checksum
C) Hamming code
D) Gray code

Answer: C
Explanation: Hamming code is a linear block code used for error correction.

15. What happens when a single-bit error occurs in data protected by parity bit?
A) Detected by parity check
B) Undetected
C) Corrected automatically
D) Causes data loss

Answer: A
Explanation: Single-bit error changes parity, so it’s detected.

16. In checksum, the receiver adds all received segments including checksum to:
A) Check for sum overflow
B) Verify if the sum equals zero
C) Increase data size
D) Encrypt data

Answer: B
Explanation: Sum should be zero (or a fixed value) for no error.

17. Which code is most efficient for single-bit error correction?


A) Parity Bit
B) Checksum
C) Hamming code
D) Gray code

Answer: C
Explanation: Hamming code efficiently corrects single-bit errors.
18. What type of code is Gray code?
A) Error detection code
B) Error correction code
C) Binary numeral system
D) Non-weighted code to prevent errors in digital systems

Answer: D
Explanation: Gray code changes only one bit between consecutive numbers, reducing errors.

19. Which error detection code uses polynomial division?


A) Parity bit
B) Checksum
C) CRC (Cyclic Redundancy Check)
D) Hamming code

Answer: C
Explanation: CRC uses polynomial division for error checking.

20. Which code can both detect and correct single-bit errors?
A) Parity bit
B) Checksum
C) Hamming code
D) ASCII

Answer: C
Explanation: Hamming code can detect and correct single-bit errors.

Topic: Alphanumeric Codes and Gray Code

1. Which code is primarily used to represent text characters in computers?


A) ASCII
B) BCD
C) Gray code
D) Parity bit

Answer: A
Explanation: ASCII (American Standard Code for Information Interchange) encodes characters
like letters, digits, and symbols.
2. How many bits are used in standard ASCII code?
A) 6
B) 7
C) 8
D) 16

Answer: B
Explanation: Standard ASCII uses 7 bits to represent 128 characters.

3. Which code is an 8-bit extension of ASCII?


A) EBCDIC
B) BCD
C) Gray code
D) Unicode

Answer: A
Explanation: EBCDIC (Extended Binary Coded Decimal Interchange Code) is an 8-bit character
encoding used mainly by IBM.

4. What does BCD stand for?


A) Binary Coded Decimal
B) Binary Code Decimal
C) Bit Coded Digit
D) None of these

Answer: A
Explanation: BCD represents each decimal digit by its 4-bit binary equivalent.

5. In BCD, the decimal number 9 is represented as:


A) 1001
B) 1010
C) 1100
D) 1111

Answer: A
Explanation: 9 in decimal is 1001 in 4-bit binary (BCD).
6. What is the main advantage of Gray code over binary code?
A) Faster computation
B) Only one bit changes between consecutive numbers
C) Smaller size
D) Used in error correction

Answer: B
Explanation: Gray code changes only one bit at a time, reducing errors in digital systems like
rotary encoders.

7. Which code is non-weighted?


A) ASCII
B) BCD
C) Gray code
D) EBCDIC

Answer: C
Explanation: Gray code is a non-weighted code where bit positions don’t have assigned
weights.

8. How do you convert binary to Gray code?


A) XOR the binary number with itself shifted right by one bit
B) Add parity bit
C) Complement all bits
D) None of these

Answer: A
Explanation: Gray code is formed by XORing the binary number with its right-shifted version.

9. The decimal number 7 in 4-bit Gray code is:


A) 1000
B) 1100
C) 0100
D) 0111
Answer: B
Explanation: Binary 7 = 0111; Gray code = 0 1 1 0.

10. Which of the following codes is weighted?


A) Gray code
B) BCD
C) EBCDIC
D) Parity bit

Answer: B
Explanation: BCD is weighted because each bit has positional value.

11. What is the primary use of EBCDIC?


A) Networking
B) IBM mainframes
C) Microcontrollers
D) Mobile phones

Answer: B
Explanation: EBCDIC is used mostly in IBM mainframe and midrange computer systems.

12. How many decimal digits can be represented by one byte in BCD?
A) 1
B) 2
C) 3
D) 4

Answer: B
Explanation: Each decimal digit uses 4 bits; 1 byte (8 bits) can represent 2 digits.

13. Which alphanumeric code uses 16 bits per character?


A) ASCII
B) Unicode
C) EBCDIC
D) BCD
Answer: B
Explanation: Unicode uses 16 bits (or more) to cover a vast range of characters.

14. What is the Gray code equivalent of binary 1101?


A) 1001
B) 1011
C) 1111
D) 1101

Answer: B
Explanation: XOR 1101 with 0110 (shift right by 1) = 1011.

15. Which code is best for minimizing errors in analog to digital conversion?
A) ASCII
B) Gray code
C) BCD
D) Parity bit

Answer: B
Explanation: Gray code minimizes errors by only changing one bit at a time.

16. ASCII uses how many bits to represent the character 'A'?
A) 5
B) 6
C) 7
D) 8

Answer: C
Explanation: 'A' in ASCII is 1000001 (7 bits).

17. What is the decimal equivalent of BCD 0101 1001?


A) 59
B) 69
C) 95
D) 85
Answer: A
Explanation: 0101 = 5, 1001 = 9, so number is 59.

18. Which code is more compact for representing decimal digits?


A) BCD
B) ASCII
C) Gray code
D) EBCDIC

Answer: A
Explanation: BCD directly encodes decimal digits in 4 bits.

19. In Gray code, what is the next code after 011?


A) 010
B) 001
C) 111
D) 000

Answer: A
Explanation: Gray code sequence: 011 → 010.

20. Which code would you use in digital systems to reduce switching errors?
A) ASCII
B) BCD
C) Gray code
D) EBCDIC

Answer: C
Explanation: Gray code reduces errors in digital encoders by limiting bit changes.

Topic: Combinational Circuits

(Adder/Subtractor, Encoder, Decoder, Multiplexer, Demultiplexer, Parity Generator)

1. What is the output of a half adder?


A) Sum only
B) Carry only
C) Sum and Carry
D) None of these

Answer: C
Explanation: A half adder adds two single-bit numbers and gives Sum and Carry as output.

2. A full adder can be constructed using how many half adders?


A) 1
B) 2
C) 3
D) 4

Answer: B
Explanation: A full adder is made using two half adders and an OR gate.

3. What is the sum output of a half adder with inputs A = 1, B = 1?


A) 0
B) 1
C) Undefined
D) 2

Answer: A
Explanation: Sum = A ⊕ B = 1 ⊕ 1 = 0

4. A 3-to-8 decoder has how many output lines?


A) 3
B) 8
C) 6
D) 2

Answer: B
Explanation: A decoder with 3 inputs has 2³ = 8 outputs.

5. What is the main function of a multiplexer?


A) To store data
B) To decode data
C) To select one of many inputs
D) To add binary numbers

Answer: C
Explanation: A multiplexer selects one of many inputs and forwards it to a single output line.

6. How many selection lines are required for an 8-to-1 multiplexer?


A) 2
B) 3
C) 4
D) 8

Answer: B
Explanation: For n inputs, number of select lines = log₂(n) = log₂(8) = 3.

7. The output of a 2-to-4 decoder is active when:


A) All inputs are 0
B) Input matches specific binary combinations
C) All outputs are 1
D) It receives no input

Answer: B
Explanation: The decoder activates one of the outputs based on binary input combination.

8. What is the purpose of a parity generator?


A) Add binary numbers
B) Detect errors
C) Store data
D) Perform subtraction

Answer: B
Explanation: Parity generators are used to detect errors in digital data transmission.

9. In an even parity system, the parity bit added to 1011 is:


A) 0
B) 1
C) 2
D) Can't determine

Answer: A
Explanation: Number of 1s = 3 (odd), parity bit = 1 to make it even; So parity bit = 1.

10. Which component converts binary data to decimal format?


A) Encoder
B) Decoder
C) Multiplexer
D) Demultiplexer

Answer: B
Explanation: A decoder converts binary inputs to decimal output.

11. A 4-bit binary adder adds:


A) 1-bit numbers
B) 2-bit numbers
C) 4-bit numbers
D) 8-bit numbers

Answer: C
Explanation: It adds two 4-bit binary numbers.

12. In a subtractor circuit, what is the primary logic used?


A) AND
B) XOR
C) NOT
D) NAND

Answer: B
Explanation: XOR gates are used to perform subtraction logic in digital circuits.

13. What does an encoder do?


A) Converts multiple input lines into binary output
B) Converts binary to decimal
C) Amplifies signal
D) None of the above

Answer: A
Explanation: An encoder takes 2ⁿ inputs and produces an n-bit binary output.

14. Which of the following is NOT a combinational circuit?


A) Multiplexer
B) Decoder
C) Flip-flop
D) Parity checker

Answer: C
Explanation: Flip-flops are sequential circuits because they have memory.

15. What is the output of a 1-to-2 demultiplexer with input = 1 and select = 0?
A) Output 0 = 1, Output 1 = 0
B) Output 0 = 0, Output 1 = 1
C) Both outputs = 0
D) Undefined

Answer: A
Explanation: Select line = 0, so input goes to output 0.

16. In an odd parity system, which is the parity bit for 1100?
A) 1
B) 0
C) 2
D) Can't determine

Answer: A
Explanation: Number of 1s = 2 (even), so parity bit = 1 to make it odd.

17. A 16-to-1 multiplexer requires how many selection lines?


A) 3
B) 4
C) 5
D) 8

Answer: B
Explanation: log₂(16) = 4 selection lines.

18. Which gate is typically used in parity checking?


A) OR
B) AND
C) XOR
D) NAND

Answer: C
Explanation: XOR gate checks parity by detecting even/odd number of 1s.

19. What is the main application of decoders in digital electronics?


A) Code conversion
B) Arithmetic operation
C) Memory address decoding
D) Parity checking

Answer: C
Explanation: Decoders are widely used for selecting memory locations.

20. Which device can be used to implement any combinational logic function?
A) Decoder
B) Encoder
C) Multiplexer
D) Adder

Answer: C
Explanation: Multiplexers can implement any logic function when configured with the correct
input combinations.

Topic 4: Sequential Circuits

(Flip-Flops: SR, JK, D, T; Registers, Counters, State Tables and Diagrams)


1. Which of the following is a basic memory element in sequential circuits?
A) Logic Gate
B) Multiplexer
C) Flip-Flop
D) Encoder

Answer: C
Explanation: Flip-Flops are fundamental memory elements used in sequential circuits.

2. What is the output of an SR Flip-Flop when both S and R inputs are 1?


A) 0
B) 1
C) No change
D) Invalid

Answer: D
Explanation: The condition S = 1 and R = 1 is invalid for an SR Flip-Flop.

3. The main difference between a D and a T flip-flop is:


A) Number of inputs
B) Edge sensitivity
C) Function of input
D) Clock input

Answer: C
Explanation: D Flip-Flop transfers input D to output Q on the clock edge; T Flip-Flop toggles its
output.

4. A JK Flip-Flop avoids the invalid condition of SR Flip-Flop by:


A) Eliminating the S and R inputs
B) Using feedback
C) Using a clock
D) Using only one input

Answer: B
Explanation: Feedback is used in JK Flip-Flops to resolve the undefined state.
5. What will be the output of a D Flip-Flop if D=1 and a rising edge clock is applied?
A) 0
B) 1
C) Toggle
D) No change

Answer: B
Explanation: D Flip-Flop transfers the D input to Q on the rising edge of the clock.

6. A T flip-flop toggles its state on:


A) High input
B) Falling clock edge
C) Every clock pulse when T = 1
D) T = 0

Answer: C
Explanation: When T = 1, the flip-flop toggles its output on each clock pulse.

7. What is the number of flip-flops required to construct a 4-bit register?


A) 2
B) 3
C) 4
D) 8

Answer: C
Explanation: Each flip-flop stores 1 bit, so 4 are needed for a 4-bit register.

8. What kind of circuit is used to store and transfer data?


A) Multiplexer
B) Register
C) Decoder
D) Adder

Answer: B
Explanation: Registers are used to store and move data within the system.
9. Which type of counter counts both up and down?
A) Ring counter
B) Ripple counter
C) Up-down counter
D) Johnson counter

Answer: C
Explanation: Up-down counters can increment or decrement the count based on control input.

10. In a 4-bit binary counter, what is the maximum count it can reach?
A) 8
B) 15
C) 16
D) 4

Answer: B
Explanation: A 4-bit counter can count from 0 to 15 (2⁴ – 1).

11. What is the modulus of a counter with 3 flip-flops?


A) 6
B) 7
C) 8
D) 9

Answer: C
Explanation: A counter with n flip-flops has a modulus of 2ⁿ. So 2³ = 8.

12. A Johnson counter is also known as:


A) Shift counter
B) Ring counter
C) Twisted ring counter
D) Parallel counter

Answer: C
Explanation: A Johnson counter is also known as a twisted ring counter.
13. What is the output of a T flip-flop if T = 0 and clock is applied?
A) Toggles
B) Resets
C) No change
D) Undefined

Answer: C
Explanation: When T = 0, the T Flip-Flop holds its previous state.

14. What is the initial state of a 3-bit shift register loaded with 101 and shifted right once?
A) 101
B) 110
C) 010
D) 010 with 0 shifted in

Answer: D
Explanation: Right shift pushes bits right, with 0 filling the MSB.

15. Which flip-flop is preferred for counters?


A) SR
B) JK
C) D
D) T

Answer: D
Explanation: T Flip-Flops toggle their output and are ideal for counting.

16. What does a state table represent in sequential circuits?


A) Input logic
B) All possible transitions
C) Output logic only
D) Truth table

Answer: B
Explanation: A state table shows transitions from current to next states based on inputs.
17. What is the next state of a JK Flip-Flop when J = K = 1 and current state is 0?
A) 0
B) 1
C) Toggle to 1
D) Undefined

Answer: C
Explanation: JK with J = K = 1 toggles the output, so it becomes 1.

18. An asynchronous counter is also known as:


A) Ripple counter
B) Ring counter
C) Synchronous counter
D) Parallel counter

Answer: A
Explanation: In asynchronous (ripple) counters, flip-flops are triggered by the output of the
previous flip-flop.

19. Which flip-flop is used in shift registers?


A) D
B) T
C) JK
D) SR

Answer: A
Explanation: D Flip-Flops are commonly used in shift registers for bit storage and shifting.

20. What is the role of the clock in a sequential circuit?


A) Power the circuit
B) Perform arithmetic
C) Synchronize operations
D) Control memory

Answer: C
Explanation: The clock signal synchronizes changes in state in sequential circuits.
Topic 4: Memory Types and Microprocessor Basics

1. Which of the following memory types is volatile?

A. ROM
B. EEPROM
C. DRAM
D. PROM

Answer: C. DRAM
Explanation: DRAM (Dynamic RAM) is volatile and loses data when power is turned off. ROM,
PROM, and EEPROM are non-volatile.

2. Which memory is used to store the BIOS in a computer?

A. SRAM
B. PROM
C. EEPROM
D. DRAM

Answer: C. EEPROM
Explanation: BIOS is stored in EEPROM (Electrically Erasable Programmable Read-Only Memory)
as it needs to retain data even when power is off and be updated occasionally.

3. Which of the following is the fastest memory?

A. Hard disk
B. DRAM
C. SRAM
D. ROM

Answer: C. SRAM
Explanation: SRAM (Static RAM) is faster and more expensive than DRAM and is used for cache
memory.

4. Which of the following is not a type of ROM?

A. PROM
B. EPROM
C. DRAM
D. EEPROM

Answer: C. DRAM
Explanation: DRAM is a type of RAM, not ROM. The others are all types of ROM.

5. In microprocessor systems, which bus is responsible for transferring data between CPU and
memory?

A. Address bus
B. Data bus
C. Control bus
D. Status bus

Answer: B. Data bus


Explanation: The data bus carries actual data between processor and memory.

6. Which microprocessor was first used in personal computers?

A. 8085
B. 8086
C. Z80
D. Intel 4004

Answer: B. 8086
Explanation: Intel 8086 was the first 16-bit microprocessor widely used in PCs.

7. How many lines are there in an address bus to access 64KB memory?

A. 8
B. 16
C. 32
D. 64

Answer: B. 16
Explanation: 2^16 = 65,536 = 64KB; hence 16 address lines are required.

8. Which of the following memories is reprogrammable using ultraviolet light?


A. PROM
B. EPROM
C. EEPROM
D. ROM

Answer: B. EPROM
Explanation: EPROM can be erased using UV light and reprogrammed.

9. Microcontroller is best defined as:

A. A small processor
B. CPU with memory and I/O ports
C. Advanced CPU
D. CPU with keyboard

Answer: B. CPU with memory and I/O ports


Explanation: A microcontroller integrates CPU, memory, and I/O ports on a single chip.

10. What is the function of the control bus in a microprocessor system?

A. Send addresses
B. Carry data
C. Manage signals like read/write
D. Store memory

Answer: C. Manage signals like read/write


Explanation: The control bus carries control signals (e.g., read, write, interrupt) from the CPU.

11. Which type of RAM must be periodically refreshed?

A. SRAM
B. DRAM
C. ROM
D. PROM

Answer: B. DRAM
Explanation: DRAM stores each bit in a capacitor that leaks charge and thus requires refreshing.
12. Which type of ROM can be reprogrammed without removing it from the circuit?

A. PROM
B. EPROM
C. EEPROM
D. ROM

Answer: C. EEPROM
Explanation: EEPROM can be erased and reprogrammed electrically while in-circuit.

13. Which of the following has the highest data transfer rate?

A. Hard Disk
B. RAM
C. Cache
D. SSD

Answer: C. Cache
Explanation: Cache memory is closest to the CPU and has the highest speed.

14. SRAM is used for:

A. BIOS
B. Secondary Storage
C. Cache Memory
D. Main Memory

Answer: C. Cache Memory


Explanation: SRAM is fast and used for cache, despite its higher cost.

15. What does ROM stand for?

A. Random Organized Memory


B. Read Only Memory
C. Read Oriented Memory
D. Reserved Operational Memory

Answer: B. Read Only Memory


Explanation: ROM stands for Read Only Memory, which is non-volatile.
16. Which of these memories is most expensive per bit?

A. SRAM
B. DRAM
C. ROM
D. HDD

Answer: A. SRAM
Explanation: Due to its speed and architecture, SRAM is the most expensive.

17. Which of these is non-volatile and can be programmed only once?

A. RAM
B. EEPROM
C. PROM
D. DRAM

Answer: C. PROM
Explanation: PROM can be programmed once after manufacturing and retains data
permanently.

18. Which component is known as the "brain" of a microcomputer?

A. ALU
B. Control Unit
C. CPU
D. Memory

Answer: C. CPU
Explanation: The CPU (Central Processing Unit) is the main component that executes
instructions.

19. Which microprocessor was the first commercially available one?

A. Intel 4004
B. Intel 8086
C. Zilog Z80
D. Motorola 68000

Answer: A. Intel 4004


Explanation: Intel 4004 was the first microprocessor released in 1971.

20. What is the main advantage of EEPROM over EPROM?

A. Cheaper
B. Faster
C. Can be erased electrically
D. Uses less power

Answer: C. Can be erased electrically


Explanation: EEPROM does not require UV light and can be erased/programmed electrically.

Key Takeaways:

 RAM vs ROM: RAM is volatile; ROM is non-volatile.

 SRAM is fast and used for cache; DRAM is slow but cheaper, used for main memory.

 EPROM uses UV light; EEPROM can be erased electrically.

 Microprocessor evolution started with Intel 4004; 8086 was the first PC microprocessor.

 Control, data, and address buses each serve unique roles in communication.

Topic 5: Logic Gates and Digital Electronics

1. Which logic gate has an output that is true only when all inputs are true?

A. OR
B. AND
C. NAND
D. NOR
Answer: B. AND
Explanation: AND gate outputs 1 only if all inputs are 1.

2. The output of a NAND gate is false only when:


A. Any one input is 0
B. All inputs are 1
C. All inputs are 0
D. Only one input is 1
Answer: B. All inputs are 1
Explanation: NAND = NOT + AND. It outputs 0 only if all inputs are 1.

3. The universal gates are:

A. AND and OR
B. XOR and XNOR
C. NAND and NOR
D. AND and NOR
Answer: C. NAND and NOR
Explanation: NAND and NOR can be used to construct any logic gate.

4. DeMorgan’s First Theorem states:

A. (A + B)’ = A’.B’
B. (A.B)’ = A’ + B’
C. (A + B)’ = A + B
D. A + B = A.B
Answer: A. (A + B)’ = A’.B’
Explanation: This is the first of DeMorgan’s laws.

5. The SOP form of the Boolean expression A'B + AB' is an example of:

A. Half adder
B. XOR gate
C. NOR gate
D. NAND gate
Answer: B. XOR gate
Explanation: A'B + AB' is the standard form of A XOR B.

6. A NOT gate is also known as a:


A. Inverter
B. Buffer
C. Amplifier
D. Decoder
Answer: A. Inverter
Explanation: It inverts the input signal.

7. Which logic gate outputs 0 only when all inputs are 0?

A. OR
B. AND
C. NOR
D. XOR
Answer: A. OR
Explanation: OR gate outputs 0 only when all inputs are 0.

8. The output of a NOR gate is:

A. The AND of all inputs


B. The complement of OR of inputs
C. The XOR of all inputs
D. The OR of all inputs
Answer: B. The complement of OR of inputs

9. K-map is used to:

A. Build computers
B. Perform arithmetic
C. Minimize Boolean expressions
D. Convert binary to decimal
Answer: C. Minimize Boolean expressions

10. The K-map of 4 variables has how many cells?

A. 8
B. 16
C. 32
D. 64
Answer: B. 16

11. In a 2-variable K-map, how many adjacent cells does each cell have?

A. 1
B. 2
C. 3
D. 4
Answer: D. 4

12. A quad in K-map represents:

A. 1 cell
B. 2 adjacent cells
C. 4 adjacent cells
D. 8 adjacent cells
Answer: C. 4 adjacent cells

13. SOP stands for:

A. Standard OR Product
B. Sum of Products
C. Sum or Product
D. Simple Output Processor
Answer: B. Sum of Products

14. POS stands for:

A. Product of Sums
B. Power of Sums
C. Product of Signals
D. Position of Signals
Answer: A. Product of Sums
15. What is the output of an XOR gate when both inputs are 1?

A. 1
B. 0
C. Depends on input
D. Undefined
Answer: B. 0

16. A 3-input AND gate will produce 1 output when:

A. All inputs are 0


B. Only one input is 1
C. All inputs are 1
D. Any input is 1
Answer: C. All inputs are 1

17. An XNOR gate is also called:

A. Exclusive OR
B. Equivalence gate
C. Inverter
D. Half adder
Answer: B. Equivalence gate
Explanation: XNOR is 1 when inputs are equal.

18. Which of the following pairs of gates are functionally complete?

A. XOR, XNOR
B. NAND, NOR
C. AND, OR
D. NOT, AND
Answer: B. NAND, NOR

19. A group of 8 adjacent 1s in K-map is called:

A. Pair
B. Quad
C. Octet
D. Cell
Answer: C. Octet

20. Boolean expression A + A = ?

A. A
B. 1
C. 0
D. A’
Answer: A. A
Explanation: A + A = A is an Idempotent Law in Boolean algebra.

21. Boolean expression A.A’ = ?

A. 1
B. 0
C. A
D. A’
Answer: B. 0

22. Boolean expression A + 1 = ?

A. 1
B. 0
C. A
D. A’
Answer: A. 1

23. Boolean expression A + AB = ?

A. AB
B. A
C. B
D. A + B
Answer: B. A
Explanation: Absorption Law.

24. Boolean expression A + A’B = ?

A. A + B
B. B
C. A’
D. A
Answer: A. A + B

25. Which one is not a basic logic gate?

A. AND
B. OR
C. NAND
D. NOT
Answer: C. NAND

26. The total number of possible input combinations for 3 variables is:

A. 4
B. 6
C. 8
D. 16
Answer: C. 8

27. Which of the following is not a canonical form?

A. SOP
B. POS
C. Boolean
D. Minterm
Answer: C. Boolean
28. The term 'don’t care' in K-map is used to:

A. Increase complexity
B. Ignore valid outputs
C. Minimize expressions
D. Fill empty cells
Answer: C. Minimize expressions

29. What is the decimal equivalent of binary 1010?

A. 10
B. 12
C. 15
D. 8
Answer: A. 10

30. Which law: A + AB = A is an example of?

A. Associative
B. Absorption
C. Distributive
D. Demorgan
Answer: B. Absorption

Key Takeaways:

 Master basic and universal gates (AND, OR, NOT, NAND, NOR, XOR, XNOR).

 Know Boolean identities and DeMorgan’s Theorems.

 Practice K-map simplifications up to 4 variables with pairs, quads, octets.

 Understand SOP/POS forms, their advantages in circuit design.

 Always remember NAND and NOR are universal gates.

 Practice Boolean simplification using laws like identity, null, complement, absorption.:

1. Which of the following logic gates is a universal gate?


a) AND
b) OR
c) NAND
d) XOR
Answer: c) NAND
Explanation: NAND and NOR gates are called universal gates because they can be used to
construct all other gates.

2. What is the output of an AND gate if all its inputs are 1?

a) 0
b) 1
c) Depends on number of inputs
d) Cannot be determined
Answer: b) 1
Explanation: AND gate gives 1 only when all inputs are 1.

3. The Boolean expression for an OR gate is:

a) A·B
b) A + B
c) A ⊕ B
d) A'B
Answer: b) A + B
Explanation: The '+' symbol denotes logical OR.

4. The output of NOR gate is 1 when:

a) All inputs are 1


b) At least one input is 1
c) All inputs are 0
d) Any one input is 0
Answer: c) All inputs are 0
Explanation: NOR gate is the inverse of OR gate.

5. What is DeMorgan’s first theorem?


a) (A + B)’ = A’B’
b) (A·B)’ = A + B
c) (A + B)’ = A’ + B’
d) (A·B)’ = A’B’
Answer: a) (A + B)’ = A’·B’
Explanation: First DeMorgan’s Theorem transforms OR into AND with complements.

6. Which gate has the truth table where output is 1 only when inputs are different?

a) AND
b) OR
c) XOR
d) NAND
Answer: c) XOR
Explanation: XOR outputs 1 only when inputs are different.

7. Which gate is used to detect parity in digital circuits?

a) XOR
b) AND
c) OR
d) NOT
Answer: a) XOR
Explanation: XOR is commonly used in parity checkers.

8. Identify the expression equivalent to NOR gate:

a) (A + B)’
b) A’ + B’
c) (A·B)’
d) A’·B’
Answer: a) (A + B)’
Explanation: NOR is the negation of OR.

9. A NAND gate is equivalent to:


a) (A + B)’
b) (A·B)’
c) A’·B’
d) A’ + B’
Answer: b) (A·B)’
Explanation: NAND is NOT-AND.

10. Which logic gate is used to implement DeMorgan’s theorems?

a) AND
b) OR
c) NAND and NOR
d) XOR
Answer: c) NAND and NOR
Explanation: DeMorgan’s laws relate NAND/NOR with basic gates.

11. How many cells are in a 4-variable K-map?

a) 8
b) 12
c) 16
d) 32
Answer: c) 16
Explanation: 2⁴ = 16 cells.

12. What is the simplified form of A + AB?

a) AB
b) A
c) B
d) A + B
Answer: b) A
Explanation: A + AB = A(1 + B) = A

13. A logic circuit that outputs 0 when inputs are the same is:
a) NOR
b) XOR
c) AND
d) NOT
Answer: b) XOR
Explanation: XOR gives 0 for same inputs.

14. In SOP, how is the function expressed?

a) Product of Sums
b) Sum of Products
c) Sum of Complements
d) Product of Complements
Answer: b) Sum of Products
Explanation: SOP = OR (sum) of AND (product) terms.

15. What is the POS form of the function F = (A + B)(A + B')?

a) AB
b) A
c) A + B
d) AB'
Answer: b) A
Explanation: (A + B)(A + B') = A

16. The complement of A·B using DeMorgan’s theorem is:

a) A’ + B’
b) A + B
c) A’·B’
d) (A + B)’
Answer: a) A’ + B’
Explanation: (A·B)’ = A’ + B’

17. How many 1s are in the truth table of a 2-input OR gate?


a) 1
b) 2
c) 3
d) 4
Answer: c) 3
Explanation: Except 0·0, all other inputs give 1.

18. The K-map groupings must be in:

a) Any size
b) Power of 2
c) Even numbers only
d) Prime numbers
Answer: b) Power of 2
Explanation: K-map groups: 1, 2, 4, 8, etc.

19. A universal gate is one that can:

a) Perform logical AND only


b) Perform logical OR only
c) Be used to form all gates
d) Store bits
Answer: c) Be used to form all gates
Explanation: NAND and NOR gates are universal.

20. What is the Boolean expression for a NOR gate?

a) A·B
b) A + B
c) (A + B)’
d) A’ + B’
Answer: c) (A + B)’
Explanation: NOR is NOT-OR.

21. The logic gate with only one input and one output is:
a) AND
b) OR
c) NOT
d) NOR
Answer: c) NOT
Explanation: NOT inverts the input.

22. Which gate produces an output only when both inputs are not equal?

a) NAND
b) XOR
c) NOR
d) AND
Answer: b) XOR
Explanation: XOR gives 1 when inputs differ.

23. The simplified form of A·(A + B) is:

a) A
b) AB
c) B
d) A + B
Answer: a) A
Explanation: A·(A + B) = A

24. The expression (A + B)(A + C) simplifies to:

a) A + BC
b) AB + AC
c) A + B + C
d) A + BC
Answer: a) A + BC
Explanation: Apply distributive law and simplify.

25. Which of the following is not a basic logic gate?


a) AND
b) NAND
c) OR
d) NOT
Answer: b) NAND
Explanation: NAND is a universal gate, not a basic gate.

26. Which of the following is valid for a logic gate?

a) Voltage Output = Current


b) Digital Input = Analog Output
c) Logic 0 = 0V, Logic 1 = 5V
d) Output = Product of Inputs
Answer: c) Logic 0 = 0V, Logic 1 = 5V
Explanation: Standard voltage levels for digital logic.

27. The number of possible input combinations for 3 variables is:

a) 4
b) 6
c) 8
d) 10
Answer: c) 8
Explanation: 2³ = 8 combinations.

28. In a K-map, a pair is a group of how many 1s?

a) 1
b) 2
c) 4
d) 8
Answer: b) 2
Explanation: Pair = 2 adjacent 1s.

29. What is the simplified form of A + A’B?


a) A
b) A + B
c) B
d) A + A’
Answer: a) A + B
Explanation: A + A’B = (A + B)

**30. Which gate has the following truth table?

A | B | Output
0|0|1
0|1|0
1|0|0
1 | 1 | 0**
a) NOR
b) NAND
c) AND
d) NOR
Answer: a) NOR
Explanation: Only when both inputs are 0, output is 1.

1. What are the inputs of a half adder?

a) Two binary numbers


b) Three binary numbers
c) Four binary numbers
d) One binary number
Answer: a) Two binary numbers
Explanation: A half adder adds two 1-bit binary numbers and produces a sum and carry.

2. Which logic gates are used in a half adder?

a) AND and OR
b) AND and XOR
c) XOR and NOT
d) OR and XOR
Answer: b) AND and XOR
Explanation: XOR is used for SUM, AND is used for CARRY.

3. What is the carry output of a half adder when inputs are A=1 and B=1?

a) 0
b) 1
c) 2
d) Undefined
Answer: b) 1
Explanation: Carry = A AND B = 1

4. Full adder can add how many bits?

a) 1
b) 2
c) 3
d) 4
Answer: c) 3
Explanation: Full adder adds A, B, and Carry-in (Cin).

5. What is the minimum number of full adders required to add two 4-bit binary numbers?

a) 1
b) 2
c) 3
d) 4
Answer: d) 4
Explanation: One full adder for each bit.

6. In full adder, the expression for sum is:

a) A ⊕ B
b) A ⊕ B ⊕ Cin
c) (A·B) + (Cin)
d) A + B + Cin
Answer: b) A ⊕ B ⊕ Cin
Explanation: This gives the 1-bit sum.

7. What is the carry-out of a full adder with inputs A=1, B=1, Cin=1?

a) 0
b) 1
c) 2
d) 3
Answer: b) 1
Explanation: Carry = AB + BCin + ACin = 1

8. What is the sum output of full adder when A=1, B=0, Cin=1?

a) 0
b) 1
c) 2
d) 3
Answer: a) 0
Explanation: A ⊕ B ⊕ Cin = 1 ⊕ 0 ⊕ 1 = 0

9. What is the main difference between half adder and full adder?

a) Speed
b) Number of outputs
c) Number of inputs
d) Memory
Answer: c) Number of inputs
Explanation: Half adder has 2 inputs; full adder has 3 inputs.

10. Which component is used to build a binary adder?

a) Decoder
b) Encoder
c) Half and Full adders
d) Counter
Answer: c) Half and Full adders
Explanation: Binary adder circuits are constructed using these.

11. A 4-bit ripple carry adder is constructed using:

a) 4 half adders
b) 4 full adders
c) 4 multiplexers
d) 2 half + 2 full adders
Answer: b) 4 full adders
Explanation: Each full adder handles one bit and the carry from previous stage.

12. The ripple carry adder is slow because:

a) It uses multiplexers
b) Carry propagation takes time
c) It uses large memory
d) All outputs are generated at once
Answer: b) Carry propagation takes time
Explanation: Carries ripple through all stages.

13. In 2’s complement, to subtract B from A, we:

a) Add A and B
b) Subtract A from B
c) Add A and 2’s complement of B
d) Subtract B from A directly
Answer: c) Add A and 2’s complement of B
Explanation: Subtraction is performed by adding the complement.

14. The 2’s complement of 1101 is:

a) 0010
b) 0101
c) 1110
d) 0011
Answer: d) 0011
Explanation: Invert and add 1: 0010 + 1 = 0011

15. What is the 2’s complement of 1000?

a) 0111
b) 1000
c) 0000
d) 1111
Answer: b) 1000
Explanation: 2's complement of a number is same when MSB is set and rest are 0.

16. Which operation is performed by an adder-subtractor circuit?

a) Only addition
b) Only subtraction
c) Addition and Subtraction
d) Multiplication
Answer: c) Addition and Subtraction
Explanation: It uses XOR gates to flip bits for subtraction.

17. A binary adder performs which operation?

a) Logical AND
b) Bitwise XOR
c) Binary Addition
d) Shift
Answer: c) Binary Addition
Explanation: It adds two binary numbers.

18. What is the carry-out of half adder with A=0, B=1?

a) 0
b) 1
c) 2
d) Undefined
Answer: a) 0
Explanation: AND(0,1) = 0

19. For A=1, B=0, Cin=1, what is sum and carry in full adder?

a) Sum = 0, Carry = 1
b) Sum = 1, Carry = 0
c) Sum = 1, Carry = 1
d) Sum = 0, Carry = 0
Answer: a) Sum = 0, Carry = 1
Explanation: A⊕B⊕Cin = 0, Carry = AB + BCin + ACin = 1

20. What is the advantage of using 2’s complement over 1’s complement?

a) More memory
b) Easier logic implementation
c) Slower speed
d) Less accurate
Answer: b) Easier logic implementation
Explanation: 2's complement avoids multiple representations of zero.

21. The overflow in binary addition happens when:

a) Carry = 0
b) Result exceeds fixed bit size
c) Subtraction occurs
d) All bits are 1
Answer: b) Result exceeds fixed bit size
Explanation: It cannot be represented in the fixed number of bits.

22. The XOR gate in adder-subtractor circuit is used for:

a) Generating carry
b) Generating borrow
c) Inverting bits of B
d) Performing AND
Answer: c) Inverting bits of B
Explanation: XOR with control bit flips B to perform subtraction.

23. In an ALU, the arithmetic section performs:

a) Logical shifting
b) Arithmetic operations
c) Data storage
d) Memory addressing
Answer: b) Arithmetic operations
Explanation: It handles add, subtract, increment, etc.

24. Which gate is used to implement binary adder carry logic?

a) OR
b) AND
c) XOR
d) NOT
Answer: b) AND
Explanation: Carry = A·B

25. In 4-bit 2’s complement system, -5 is represented as:

a) 1011
b) 1110
c) 1010
d) 1011
Answer: d) 1011
Explanation: 5 = 0101; Invert = 1010, Add 1 = 1011

26. The sum output of a half adder is 1 when inputs are:

a) A=0, B=0
b) A=1, B=1
c) A=1, B=0
d) A=1, B=1
Answer: c) A=1, B=0
Explanation: XOR(1,0) = 1

27. The function of the control signal in ALU is to:

a) Execute logic gates


b) Select operation type
c) Store data
d) Generate clock
Answer: b) Select operation type
Explanation: Control unit tells ALU what to do.

28. Which part of the ALU gives the output for logic operations?

a) Arithmetic section
b) Logic section
c) Memory
d) Control unit
Answer: b) Logic section
Explanation: AND, OR, NOT, etc., are handled here.

29. If B = 0110, what is its 2’s complement?

a) 1001
b) 1010
c) 1011
d) 0111
Answer: a) 1010
Explanation: Invert 0110 = 1001; +1 = 1010

30. In ALU, what decides whether operation is addition or subtraction?

a) Carry bit
b) Control signal
c) MSB
d) Clock
Answer: b) Control signal
Explanation: It selects between add or subtract modes.

You might also like