โ† Digital Electronics learning path
Digital Electronics ยท Module 1 of 10

Number systems and codes

Binary, octal, hexadecimal and codes such as BCD and Gray.

๐Ÿ“– Key ideas

  1. Digital circuits use two levels, 0 and 1, so they count in binary (base 2).
  2. Octal (base 8) groups 3 bits and hexadecimal (base 16) groups 4 bits, which makes long binary numbers easy to read.
  3. Signed numbers are usually stored in 2's complement: invert all bits and add 1 to get the negative.
  4. BCD stores each decimal digit in 4 bits, so 25 is 0010 0101.
  5. Gray code changes only one bit between consecutive values, which avoids glitches in encoders.
๐Ÿ’ก Real-life example: Like counting with only two fingers: once both are used, you carry to the next place, exactly as 9 carries to 10 in decimal.
BinaryBase-2 number system using 0 and 1
HexadecimalBase-16 system using 0-9 and A-F
2's complementSigned form: invert bits and add 1
Gray codeCode where consecutive values differ in one bit