Monday, August 18, 2025

TRB ::50 MCQ Questions with Detailed Answers: Digital Codes

 

50 MCQ Questions with Detailed Answers: Digital Codes


1. What is a digital code?

A. A set of analog voltages
B. A symbolic representation using binary digits
C. A series of decimal digits
D. None of the above

Answer: B
Explanation: Digital codes use sequences of 0s and 1s (binary digits) to represent values or symbols in digital systems.


2. Which code is most commonly used for representing text in computers?

A. BCD
B. ASCII
C. Gray
D. Excess-3

Answer: B
Explanation: The ASCII (American Standard Code for Information Interchange) is widely used for representing letters, numbers, and symbols.


3. What is the binary code for decimal 7?

A. 110
B. 111
C. 101
D. 011

Answer: B
Explanation: 
710=1112710=1112.


4. How many bits are in a standard ASCII code?

A. 6
B. 7
C. 8
D. 16

Answer: B
Explanation: Standard ASCII uses 7 bits (extended ASCII uses 8 bits).


5. Which code ensures that only one bit changes between successive numbers?

A. XS-3
B. Gray
C. BCD
D. Parity

Answer: B
Explanation: Gray code is designed so that only one bit changes in an adjacent codeword.


6. What is the main property of a self-complementing code?

A. Hamming distance of 1
B. Sum of a number and its 9’s complement is a set value
C. Used for error correction
D. None of the above

Answer: B
Explanation: In self-complementing codes, the sum of a code and its complement yields a constant (like 9 for decimal).


7. What is the BCD code for the number 25?

A. 11001
B. 0010 0101
C. 1010 0101
D. 0110 1001

Answer: B
Explanation: 2 → 0010 and 5 → 0101 in BCD.


8. What is the Excess-3 code for decimal 4?

A. 1001
B. 1010
C. 0111
D. 1100

Answer: C
Explanation: 4 + 3 = 7; 7 in binary = 0111.


9. Which code is used by IBM mainframes for text?

A. ASCII
B. EBCDIC
C. Parity
D. Gray

Answer: B
Explanation: EBCDIC (Extended Binary Coded Decimal Interchange Code) is used in IBM systems.


10. What is the Gray code of decimal 5?

A. 0111
B. 0101
C. 1001
D. 1110

Answer: A
Explanation: 5 is 0101 in binary; Gray code: 0111.


11. Which code is NOT weighted?

A. BCD
B. 8-4-2-1
C. Gray
D. 2421

Answer: C
Explanation: Gray code is not weighted; it is a reflective code.


12. Which property does Gray code have?

A. Minimum bit change
B. Maximum bit change
C. No regularity
D. Self-complementing

Answer: A
Explanation: Only one bit changes in transitioning to the next value.


13. What is the BCD code for decimal 9?

A. 1001
B. 1111
C. 1011
D. 0111

Answer: A
Explanation: 9 in BCD is 1001.


14. In even parity, how many 1’s should the output contain?

A. Odd
B. Even
C. None
D. Any

Answer: B
Explanation: Even parity ensures total ones (including the parity bit) is even.


15. Which code is mainly used for fault tolerance in communication?

A. Binary
B. Hamming
C. ASCII
D. XS-3

Answer: B
Explanation: Hamming codes are used for error detection and correction (fault tolerance).


16. Find the XS-3 code for decimal 2.

A. 0101
B. 0110
C. 1000
D. 0111

Answer: A
Explanation: 2 + 3 = 5 → 0101.


17. What is the advantage of BCD over binary?

A. Easier arithmetic operations
B. Simple conversion to decimal display
C. Uses fewer bits
D. None

Answer: B
Explanation: BCD allows straightforward conversion and display of decimal digits.


18. What does the ASCII code 01000001 represent?

A. C
B. A
C. L
D. Z

Answer: B
Explanation: 01000001 is the ASCII for 'A'.


19. If you have the binary 1001, what is its Gray code?

A. 1111
B. 1101
C. 1011
D. 1100

Answer: B
Explanation: Binary 1001 → Gray 1101 by comparing adjacent bits.


20. Which code is called "8421" code?

A. BCD
B. Gray
C. ASCII
D. Hamming

Answer: A
Explanation: The standard weighted BCD code is 8-4-2-1 (8421).


21. What is parity used for?

A. Error detection
B. Data compression
C. Increasing speed
D. Code conversion

Answer: A
Explanation: Parity bits help detect errors in data transmission.


22. What is the binary equivalent of BCD code 0110?

A. 5
B. 6
C. 7
D. 8

Answer: B
Explanation: 0110 in BCD is the digit 6.


23. How many bit changes are there from Gray code 0100 to 0101?

A. 1
B. 2
C. 0
D. 3

Answer: A
Explanation: Gray code changes only one bit at a time.


24. What does EBCDIC stand for?

A. Extended Binary Coded Decimal Interchange Code
B. Electronic Binary Coded Data Integrated Chip
C. Extended Binary Communication Device Information Code
D. None

Answer: A
Explanation: That’s the full form.


25. How many bits are in EBCDIC code?

A. 4
B. 7
C. 8
D. 16

Answer: C
Explanation: EBCDIC uses 8 bits per symbol.


26. Which code is called a self-complementing code?

A. Binary
B. Gray
C. 2421
D. 8421

Answer: C
Explanation: 2421 code is self-complementing.


27. What is the minimum Hamming distance between two valid codewords in Gray code?

A. 0
B. 1
C. 2
D. 4

Answer: B
Explanation: Gray code differs in only one bit between adjacent numbers.


28. Which digital code is best for shaft encoders to avoid errors?

A. ASCII
B. XS-3
C. Gray
D. BCD

Answer: C
Explanation: Gray code minimizes transition errors; ideal for position encoders.


29. What is the result when 1001 (Gray) is converted to binary?

A. 1100
B. 1111
C. 1010
D. 1011

Answer: B
Explanation: Successive XOR of bits gives binary 1111.


30. What is the number of codes in binary with 4 bits?

A. 4
B. 12
C. 8
D. 16

Answer: D
Explanation: 
24=1624=16 possible codes.


31. What is the Gray code equivalent for binary 0110?

A. 0101
B. 0011
C. 0111
D. 1110

Answer: A
Explanation: 0110 in binary converts to 0101 in Gray code.


32. What is the main advantage of coded data?

A. Increased storage
B. Error detection and correction
C. Complex arithmetic
D. None

Answer: B
Explanation: Codes make data more robust to transmission/storage errors.


33. The process of changing data from one code to another is called:

A. Encoding
B. Modulation
C. Multiplexing
D. Decoding

Answer: A
Explanation: Encoding is the conversion between data representations or codes.


34. ASCII is an example of:

A. Numeric code
B. Alphanumeric code
C. Non-weighted code
D. Parity code

Answer: B
Explanation: ASCII encodes alphabets, numbers, and special characters.


35. What is the 4-bit binary code for decimal 12?

A. 1100
B. 1001
C. 1010
D. 0111

Answer: A
Explanation: 12 in binary is 1100.


36. How many BCD codes are possible for single decimal digits?

A. 10
B. 16
C. 8
D. 9

Answer: A
Explanation: 0–9 digits, so 10 possible BCD codes.


37. The Gray code of decimal 3 is:

A. 0001
B. 0010
C. 0011
D. 0110

Answer: B
Explanation: Binary 0011 yields Gray code 0010.


38. Excess-3 code for decimal zero is:

A. 0000
B. 1001
C. 0011
D. 1011

Answer: C
Explanation: 0 + 3 = 3 → 0011.


39. Which code represents only numbers?

A. ASCII
B. EBCDIC
C. BCD
D. Parity

Answer: C
Explanation: BCD is for decimal number representation.


40. What does Hamming code allow?

A. Detection only
B. Correction and detection
C. Compression
D. Parallelism

Answer: B
Explanation: Hamming code allows detection and correction of single-bit errors.


41. What is the highest decimal number represented by 4 bits in BCD?

A. 9
B. 15
C. 10
D. 99

Answer: A
Explanation: BCD for 9 is 1001. Each BCD digit is 4 bits.


42. What is the binary value of ASCII 'B'?

A. 01100010
B. 01000010
C. 01001010
D. 01000101

Answer: B
Explanation: 'B' in ASCII is 01000010.


43. How are error correcting codes classified?

A. Parity and arithmetic
B. Block and convolutional
C. Weighted and non-weighted
D. BCD and ASCII

Answer: B
Explanation: Error correcting codes can be block or convolutional.


44. Which digital code is universal for all computers?

A. ASCII
B. EBCDIC
C. XS-3
D. Gray

Answer: A
Explanation: ASCII is almost universally used in computers and networks.


45. BCD code for decimal 4 is:

A. 0100
B. 1000
C. 1001
D. 0111

Answer: A
Explanation: 4 in BCD is 0100.


46. In parity, if the data is "101011" and even parity is used, what is the parity bit?

A. 0
B. 1
C. 11
D. 100

Answer: B
Explanation: There are three 1's (odd); parity bit '1' makes total 1's even.


47. ASCII uses how many characters?

A. 255
B. 128
C. 16
D. 10

Answer: B
Explanation: Standard ASCII uses 128 codes (7 bits).


48. Which is not an example of a digital code?

A. BCD
B. Gray
C. Morse
D. ASCII

Answer: C
Explanation: Morse code is not a digital code (no fixed bit representation).


49. Parity bit mainly helps in:

A. Counting bits
B. Detecting errors
C. Changing voltage
D. Sorting numbers

Answer: B
Explanation: Helps to detect single-bit errors.


50. Which is a non-weighted code?

A. 2421
B. XS-3
C. BCD
D. Gray

Answer: D
Explanation: Gray code is non-weighted and reflective.

 

No comments:

Post a Comment

TRB ::50 MCQ Questions with Detailed Answers: Digital Codes

  50 MCQ Questions with Detailed Answers: Digital Codes 1. What is a digital code? A. A set of analog voltages B. A symboli...