- Asked 2/22
- 2070 Chaitra · 1+5 marks
Digital signal and Gray code
Short answer
A digital signal has discrete levels (typically 0 and 1) that change at discrete times. Gray code is an unweighted reflected binary code where consecutive numbers differ by one bit; e.g., binary 1101 → Gray 1011. Used in encoders and K-maps.
Define digital signal and explain Gray code with example.
Digital signal
A digital signal is a signal that has only a finite number of discrete values (usually two levels, 0 and 1) and changes at discrete instants of time. Example: clock pulses and data in a computer.
Gray code
Gray code is an unweighted binary code in which two consecutive numbers differ in only one bit. It is also called the reflected binary code, because the code for bits is built by writing the -bit code, reflecting it like a mirror, and prefixing 0 to the top half and 1 to the bottom half.
1-bit 2-bit 3-bit
0 00 000
1 01 001
--- 11 011
mirror 10 010
---- 110
mirror 111
101
100
| Decimal | Binary | Gray |
|---|---|---|
| 0 | 000 | 000 |
| 1 | 001 | 001 |
| 2 | 010 | 011 |
| 3 | 011 | 010 |
| 4 | 100 | 110 |
| 5 | 101 | 111 |
| 6 | 110 | 101 |
| 7 | 111 | 100 |
Binary to Gray: keep the MSB; . Example: → 1, 1⊕1 = 0, 1⊕0 = 1, 0⊕1 = 1 → .
Gray to binary: keep the MSB; . Example: → 1, 1⊕0 = 1, 1⊕1 = 0, 0⊕1 = 1 → .
Features and uses
- Unweighted, so not used for arithmetic.
- Only one bit changes per step, so it avoids false readings in rotary shaft encoders.
- Used to label K-map rows and columns (00, 01, 11, 10).
- Used in ADCs and low-power counters.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Digital IC signal levels and Gray code · Digital Logic, chapter 1 · asked 2×
- Digital/analog signals, Gray and Excess-3 codes · Digital Logic, chapter 1
- Gray code with examples · Digital Logic, chapter 1 · asked 3×
- 3-bit Gray code synchronous counter · Digital Logic, chapter 8 · asked 2×
- BCD code and 3-bit binary-to-Gray converter · Digital Logic, chapter 1
- Gray code and 3-bit binary-to-Gray converter · Digital Logic, chapter 1
- Gray vs binary code, convert (10110)₂ to Gray · Digital Logic, chapter 1