Date: 18 May 2025

Time: 12:35:37 PM

DIGITAL ELCTRONICS/DIGITAL LOGIC DESIGN(DLD)

Number System

Number System in Digital Electronics: In digital logic design, everything works with numbers — but not just the regular numbers we use every day! Digital systems use different number systems to represent and process information.


Why Number System is Important:Number systems are important because they help computers and digital devices understand and work with information.
Since computers can only deal with two states — like ON and OFF — they use the binary number system (0s and 1s).
Different number systems (like decimal, octal, and hexadecimal) make it easier for humans to read, write, and manage big numbers in a simple way.


In short:

  • Number systems are like different languages for numbers.
  • Computers need number systems to store and process data.
  • Humans need number systems to read and understand what computers are doing.

Without number systems, computers wouldn’t be able to do any useful work!


Types of Number System: There are several types of number systems, but the most common ones used in digital electronics are:

  • Decimal Number System (Base 10)
  • Binary Number System (Base 2)
  • Octal Number System (Base 8)
  • Hexadecimal Number System (Base 16)

Decimal Number System: The decimal number system is the most common number system used in everyday life. It is a base-10 system, which means it uses 10 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. Each digit's position represents a power of 10.
For example, in the number 184, the digit 1 is in the hundreds place (1 × 102), the digit 8 is in the tens place (8 × 101), and the digit 4 is in the ones place (5 × 100). So, 184 = (1 × 100) + (8 × 10) + (4 × 1) = 100 + 80 + 4 = 184.


Binary Number System: The binary number system is a base-2 system that uses only two digits: 0 and 1. Each digit's position represents a power of 2. Binary is the language of computers, as they operate using two states: ON (1) and OFF (0).
For example, in the binary number 1011, the digit 1 is in the eighth place (1 × 23), the digit 0 is in the fourth place (0 × 22), the digit 1 is in the second place (1 × 21), and the digit 1 is in the ones place (1 × 20). So, 1011 = (1 × 8) + (0 × 4) + (1 × 2) + (1 × 1) = 8 + 0 + 2 + 1 = 11.


Octal Number System: The octal number system is a base-8 system that uses eight digits: 0, 1, 2, 3, 4, 5, 6, and 7. Each digit's position represents a power of 8. Octal is often used in computing as a shorthand for binary, as each octal digit can be represented by three binary digits (bits).
For example, in the octal number 345, the digit 3 is in the hundreds place (3 × 82), the digit 4 is in the tens place (4 × 81), and the digit 5 is in the ones place (5 × 80). So, 345 = (3 × 64) + (4 × 8) + (5 × 1) = 192 + 32 + 5 = 229.


Hexadecimal Number System: The hexadecimal number system is a base-16 system that uses sixteen digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. Each digit's position represents a power of 16. Hexadecimal is often used in computing as a shorthand for binary, as each hexadecimal digit can be represented by four binary digits (bits).
For example, in the hexadecimal number 2F3, the digit 2 is in the hundreds place (2 × 162), the digit F is in the tens place (15 × 161), and the digit 3 is in the ones place (3 × 160). So, 2F3 = (2 × 256) + (15 × 16) + (3 × 1) = 512 + 240 + 3 = 755.


Conversion of Number System: Converting between different number systems is essential in digital electronics. Different number systems are used for different purposes.

  • Computers work in binary (0s and 1s).
  • Humans usually work in decimal (0–9).

To communicate between humans and computers, we need convert numbers from one system to another.
For example, if we write a number in decimal, the computer needs it in binary to understand and process it.
Also, sometimes it's easier to read and write big binary numbers by converting them into hexadecimal or octal.


Decimal to Binary, Octal and Hexa: convert a decimal number to another number system, we can use the following methods:

  • Decimal to Binary: Divide the decimal number by 2 and record the remainder. Repeat this process with the quotient until the quotient is 0. The binary number is formed by reading the remainders from bottom to top.


    Example 1: convert decimal 13 to binary: (13)10 = (?)2

    • 13 ÷ 2 = 6, remainder 1
    • 6 ÷ 2 = 3, remainder 0
    • 3 ÷ 2 = 1, remainder 1
    • 1 ÷ 2 = 0, remainder 1

    So, 13 in binary is 1101 (reading the remainders from bottom to top). (13)10 = (1101)2



    Example 2: convert decimal 10.5 to binary:(10.5)10 = (?)2

    • 10 ÷ 2 = 5, remainder 0
    • 5 ÷ 2 = 2, remainder 1
    • 2 ÷ 2 = 1, remainder 0
    • 1 ÷ 2 = 0, remainder 1

    So, 10 in binary is 1010 (reading the remainders from bottom to top).


    Now, convert the decimal part (0.5) to binary:

    • 0.5 × 2 = 1.0 (integer part is 1)
    • 0.0 × 2 = 0.0 (integer part is 0)

    So, 0.5 in binary is 0.1 (reading the integer parts from top to bottom).
    Therefore, 10.5 in binary is 1010.1 (combining the integer and decimal parts). (10.5)10 = (1010.1)2

    Decimal to Binary - SemiBD

    Note: The decimal part is multiplied by 2, and the integer part is taken as the next digit in the binary representation. Keep multiplying the remaining decimal part by 2 again and again. Stop when the decimal part becomes 0 (perfect ending), or you reach the desired precision (like 2–3 digits).

  • Decimal to Octal: Divide the decimal number by 8 and record the remainder. Repeat this process with the quotient until the quotient is 0. The octal number is formed by reading the remainders from bottom to top.


    Example 1: convert decimal 13 to octal: (13)10 = (?)8

    • 13 ÷ 8 = 1, remainder 5
    • 1 ÷ 8 = 0, remainder 1

    So, 13 in octal is 15 (reading the remainders from bottom to top). (13)10 = (15)8


    Example 2: convert decimal 10.5 to octal: (10.5)10 = (?)8

    • 10 ÷ 8 = 1, remainder 2
    • 1 ÷ 8 = 0, remainder 1

    So, 10 in octal is 12 (reading the remainders from bottom to top).


    Now, convert the decimal part (0.5) to octal:

    • 0.5 × 8 = 4.0 (integer part is 4)
    • 0.0 × 8 = 0.0 (integer part is 0)

    So, 0.5 in octal is 4 (reading the integer parts from top to bottom).
    Therefore, 10.5 in octal is 12.4 (combining the integer and decimal parts). (10.5)10 = (12.4)8

    Decimal to Octal - SemiBD

    Note: The decimal part is multiplied by 8, and the integer part is taken as the next digit in the octal representation. Keep multiplying the remaining decimal part by 8 again and again. Stop when the decimal part becomes 0 (perfect ending), or you reach the desired precision (like 2–3 digits).

  • Decimal to Hexadecimal: Divide the decimal number by 16 and record the remainder. Repeat this process with the quotient until the quotient is 0. The hexadecimal number is formed by reading the remainders from bottom to top. If the remainder is greater than 9, use letters A, B, C, D, E, and F to represent the values 10, 11, 12, 13, 14, and 15, respectively.


    Example 1: convert decimal 13 to hexadecimal: (13)10 = (?)16

    • 13 ÷ 16 = 0, remainder 13

    So, 13 in hexadecimal is D (reading the remainders from bottom to top). (13)10 = (D)16


    Example 2: convert decimal 10.55 to hexadecimal: (10.55)10 = (?)16

    • 10 ÷ 16 = 0, remainder 10

    So, 10 in hexadecimal is A (reading the remainders from bottom to top).


    Now, convert the decimal part (0.55) to hexadecimal:

    • 0.55 × 16 = 8.8 (integer part is 8)
    • 0.8 × 16 = 12.8 (integer part is C)
    • 0.8 × 16 = 12.8 (integer part is C)

    So, 0.55 in hexadecimal is 8.C (reading the integer parts from top to bottom).
    Therefore, 10.55 in hexadecimal is A.8C (combining the integer and decimal parts). (10.55)10 = (A.8C)16

    Decimal to Hexadecimal - SemiBD

    Note: The decimal part is multiplied by 16, and the integer part is taken as the next digit in the hexadecimal representation. Keep multiplying the remaining decimal part by 16 again and again. Stop when the decimal part becomes 0 (perfect ending), or you reach the desired precision (like 2–3 digits).


Binary, Octal and Hexa to Decimal: convert a number from another number system to decimal, we can use the following methods:

  • Binary to Decimal: Multiply each digit of the binary number by its corresponding power of 2 and sum the results.

    Example 1: convert binary 1101 to decimal: (1101)2 = (?)10

    • 1 × 23 = 8
    • 1 × 22 = 4
    • 0 × 21 = 0
    • 1 × 20 = 1

    So, 1101 in decimal is 13 (summing the results). (1101)2 = (13)10


    Example 2: convert binary 1010.1 to decimal: (1010.1)2 = (?)10

    • 1 × 23 = 8
    • 0 × 22 = 0
    • 1 × 21 = 2
    • 0 × 20 = 0
    • 1 × 2-1 = 0.5

    So, 1010.1 in decimal is 10.5 (summing the results). (1010.1)2 = (10.5)10

    Binary to Decimal - SemiBD

    Note: The decimal part is multiplied by 2-1, 2-2, etc. for each digit after the decimal point.
    Keep multiplying the remaining decimal part by 2-1 again and again. Stop when the decimal part becomes 0 (perfect ending), or you reach the desired precision (like 2–3 digits).

  • Octal to Decimal: Multiply each digit of the octal number by its corresponding power of 8 and sum the results.

    Example 1: convert octal 15 to decimal: (15)8 = (?)10

    • 1 × 81 = 8
    • 5 × 80 = 5

    So, 15 in decimal is 13 (summing the results). (15)8 = (13)10


    Example 2: convert octal 12.4 to decimal: (12.4)8 = (?)10

    • 1 × 81 = 8
    • 2 × 80 = 2
    • 4 × 8-1 = 0.5

    So, 12.4 in decimal is 10.5 (summing the results). (12.4)8 = (10.5)10

    Octal to Decimal - SemiBD

    Note: The decimal part is multiplied by 8-1, 8-2, etc. for each digit after the decimal point.
    Keep multiplying the remaining decimal part by 8-1 again and again. Stop when the decimal part becomes 0 (perfect ending), or you reach the desired precision (like 2–3 digits).

  • Hexadecimal to Decimal: Multiply each digit of the hexadecimal number by its corresponding power of 16 and sum the results. If the digit is greater than 9, use letters A, B, C, D, E, and F to represent the values 10, 11, 12, 13, 14, and 15, respectively.

    Example 1: convert hexadecimal D to decimal: (D)16 = (?)10

    • D × 160 = 13

    So, D in decimal is 13 (summing the results). (D)16 = (13)10


    Example 2: convert hexadecimal A.8C to decimal: (A.8C)16 = (?)10

    • A × 160 = 10
    • 8 × 16-1 = 0.5
    • C × 16-2 = 0.046875

    So, A.8C in Hexadecimal is 10.546875 (summing the results). (A.8C)16 = (10.546875)10

    Hexadecimal to Decimal - SemiBD

    Note: The decimal part is multiplied by 16-1, 16-2, etc. for each digit after the decimal point.
    Keep multiplying the remaining decimal part by 16-1 again and again. Stop when the decimal part becomes 0 (perfect ending), or you reach the desired precision (like 2–3 digits).


Octal and Hexadecimal to Binary: convert a number from octal and hexadecimal to binary, we can use the following methods:

  • Octal to Binary: Convert each octal digit (0–7) into its equivalent 3-bit binary form and join them together.

    Example 1: convert octal 527 to binary: (527)8 = (?)2

    • 5 → 101 (5 × 22 + 0 × 21 + 1 × 20)
    • 2 → 010 (0 × 22 + 1 × 21 + 0 × 20)
    • 7 → 111 (1 × 22 + 1 × 21 + 1 × 20)

    So, joining them: 101010111. (527)8 = (101010111)2


    Example 2: convert octal 34.6 to binary: (34.6)8 = (?)2

    • 3 → 011 (0 × 22 + 1 × 21 + 1 × 20)
    • 4 → 100 (1 × 22 + 0 × 21 + 0 × 20)
    • . (decimal point stays as .)
    • 6 → 110 (1 × 22 + 1 × 21 + 0 × 20)

    So, joining them: 011100.110. (34.6)8 = (11100.110)2

    Octal to Binary - SemiBD

    Note: Each octal digit always becomes exactly 3 binary digits. Keep the decimal point (.) in its place during conversion.

  • Hexadecimal to Binary: Convert each hexadecimal digit (0–9, A–F) into its equivalent 4-bit binary form and join them together.

    Example 1: convert hexadecimal 2F to binary: (2F)16 = (?)2

    • 2 → 0010: (0 × 23) + (0 × 22) + (1 × 21) + (0 × 20)
    • F → 1111: (1 × 23) + (1 × 22) + (1 × 21) + (1 × 20)

    So, joining them: 00101111. (2F)16 = (00101111)2


    Example 2: convert hexadecimal 3A.7 to binary: (3A.7)16 = (?)2

    • 3 → 0011: (0 × 23) + (0 × 22) + (1 × 21) + (1 × 20)
    • A → 1010: (1 × 23) + (0 × 22) + (1 × 21) + (0 × 20)
    • . (decimal point remains as .)
    • 7 → 0111: (0 × 23) + (1 × 22) + (1 × 21) + (1 × 20)

    So, joining them: 00111010.0111. (3A.7)16 = (111010.0111)2

    Hexadecimal to Binary - SemiBD

    Note: Each hexadecimal digit always becomes exactly 4 binary digits. Keep the decimal point (.) in its place during conversion.


Binary to Octal and Hexadecimal: convert a number from binary to octal and hexadecimal, we can use the following methods:

  • Binary to Octal: Group binary digits into sets of 3 bits starting from the decimal point (left for integer part, right for fractional part). Then, convert each group to its octal equivalent.
    Alternatively, calculate using powers of 2 for each 3-bit group.

    Example 1: convert binary 110110 to octal: (110110)2 = (?)8

    • Group: (110) (110)
    • First group (110):
      • 1 × 22 + 1 × 21 + 0 × 20 = 4 + 2 + 0 = 6
    • Second group (110):
      • 1 × 22 + 1 × 21 + 0 × 20 = 4 + 2 + 0 = 6

    So, (110110)2 = (66)8


    Example 2: convert binary 10110.101 to octal: (10110.101)2 = (?)8

    • Group integer part: (010) (110) (add leading 0)
    • First group (010):
      • 0 × 22 + 1 × 21 + 0 × 20 = 0 + 2 + 0 = 2
    • Second group (110):
      • 1 × 22 + 1 × 21 + 0 × 20 = 4 + 2 + 0 = 6
    • Group fractional part: (101) (add trailing 0 if needed)
    • First group (101):
      • 1 × 22 + 0 × 21 + 1 × 20 = 4 + 0 + 1 = 5

    So, (10110.101)2 = (26.5)8

    Binary to Octal Conversion

    Note: Always group binary digits in sets of 3 starting from the decimal point. Add extra zeros at the beginning or end if needed to make full groups.

  • Binary to Hexadecimal: Group binary digits into sets of 4 bits starting from the decimal point (left for integer part, right for fractional part). Then, convert each group to its hexadecimal equivalent.
    Alternatively, calculate using powers of 2 for each 4-bit group.

    Example 1: convert binary 101110 to hexadecimal: (101110)2 = (?)16

    • Group: (0010) (1110) (add leading zeros)
    • First group (0010):
      • 0 × 23 + 0 × 22 + 1 × 21 + 0 × 20 = 0 + 0 + 2 + 0 = 2
    • Second group (1110):
      • 1 × 23 + 1 × 22 + 1 × 21 + 0 × 20 = 8 + 4 + 2 + 0 = 14 → E

    So, (101110)2 = (2E)16


    Example 2: convert binary 1101.101 to hexadecimal: (1101.101)2 = (?)16

    • Group integer part: (1101)
    • Group (1101):
      • 1 × 23 + 1 × 22 + 0 × 21 + 1 × 20 = 8 + 4 + 0 + 1 = 13 → D
    • Group fractional part: (1010) (add trailing 0)
    • Group (1010):
      • 1 × 23 + 0 × 22 + 1 × 21 + 0 × 20 = 8 + 0 + 2 + 0 = 10 → A

    So, (1101.101)2 = (D.A)16

    Binary to Hexadecimal Conversion

    Note: Always group binary digits in sets of 4 starting from the decimal point. Add extra zeros at the beginning or end if needed to complete groups.


Octal to Hexadecimal: convert a number from octal to hexadecimal, we can use the following methods:

  • Octal to Hexadecimal: First convert the octal number to binary (each octal digit to 3 binary digits). Then group binary into sets of 4 bits convert to hexadecimal.
    Also, understand by expanding powers of 2.

    Example 1: convert octal 157 to hexadecimal: (157)8 = (?)16

    • Convert octal 157 to binary:
      • 1 → 001
      • 5 → 101
      • 7 → 111
      So, 1578 = 0011011112
    • Expand binary using powers of 2:
      • 0 × 28 = 0
      • 0 × 27 = 0
      • 1 × 26 = 64
      • 1 × 25 = 32
      • 0 × 24 = 0
      • 1 × 23 = 8
      • 1 × 22 = 4
      • 1 × 21 = 2
      • 1 × 20 = 1
    • Sum: 64 + 32 + 8 + 4 + 2 + 1 = 11110
    • Now, convert 11110 to hexadecimal:
      • 111 ÷ 16 = 6 remainder 15 → F
      • 6 ÷ 16 = 0 remainder 6
      So, 11110 = 6F16

    Final answer: (157)8 = (6F)16


    Example 2: convert octal 72.4 to hexadecimal: (72.4)8 = (?)16

    • Convert octal 72.4 to binary:
      • 7 → 111
      • 2 → 010
      • 4 → 100 (fractional part)
      So, 72.48 = 111010.1002
    • Expand integer part:
      • 1 × 25 = 32
      • 1 × 24 = 16
      • 1 × 23 = 8
      • 0 × 22 = 0
      • 1 × 21 = 2
      • 0 × 20 = 0
    • Expand fractional part:
      • 1 × 2-1 = 0.5
      • 0 × 2-2 = 0
      • 0 × 2-3 = 0
    • Sum: (32 + 16 + 8 + 2) + (0.5) = 58.510
    • Convert 5810 to hex:
      • 58 ÷ 16 = 3 remainder 10 → A
      • 3 ÷ 16 = 0 remainder 3
      So, 5810 = 3A16
    • Convert 0.5 to hex:
      • 0.5 × 16 = 8.0 → 8

    Final answer: (72.4)8 = (3A.8)16

    Octal to Hexadecimal Conversion

    Note: Remember each octal digit expands to 3 binary digits (powers of 2), then group for hexadecimal.


Hexadecimal to Octal: convert a number from Hexadecimal to Octal, we can use the following methods:

  • Hexadecimal to Octal: First convert the hexadecimal number to binary (each hex digit to 4 binary digits). Then group binary into sets of 3 bits convert to octal.
    Also, understand by expanding powers of 2.

    Example 1: convert hexadecimal 2F to octal: (2F)16 = (?)8

    • Convert hexadecimal 2F to binary:
      • 2 → 0010
      • F → 1111
      So, (2F)16 = 001011112
    • Expand binary using powers of 2:
      • 0 × 27 = 0
      • 0 × 26 = 0
      • 1 × 25 = 32
      • 0 × 24 = 0
      • 1 × 23 = 8
      • 1 × 22 = 4
      • 1 × 21 = 2
      • 1 × 20 = 1
    • Sum: 32 + 8 + 4 + 2 + 1 = 4710
    • Now, convert binary to octal:
      • Group into 3 bits from right: 00 101 111
      • 00 → 0
      • 101 → 5
      • 111 → 7
      So, 001011112 = 0578

    Final answer: (2F)16 = (57)8


    Example 2: convert hexadecimal 3A.4 to octal: (3A.4)16 = (?)8

    • Convert hexadecimal 3A.4 to binary:
      • 3 → 0011
      • A → 1010
      • 4 → 0100 (fractional part)
      So, (3A.4)16 = 00111010.01002
    • Expand integer part:
      • 0 × 27 = 0
      • 0 × 26 = 0
      • 1 × 25 = 32
      • 1 × 24 = 16
      • 1 × 23 = 8
      • 0 × 22 = 0
      • 1 × 21 = 2
      • 0 × 20 = 0
    • Expand fractional part:
      • 0 × 2-1 = 0
      • 1 × 2-2 = 0.25
      • 0 × 2-3 = 0
      • 0 × 2-4 = 0
    • Sum: (32 + 16 + 8 + 2) + (0.25) = 58.2510
    • Now group binary into 3-bits:
      • Integer part: 00 111 010
      • Fractional part: 010 000
      Integer part:
      • 00 → 0
      • 111 → 7
      • 010 → 2
      Fractional part:
      • 010 → 2
      • 000 → 0
    • So, (3A.4)16 = (072.20)8

    Final answer: (3A.4)16 = (72.2)8

    Hexadecimal to Octal Conversion

    Note: Each hex digit = 4 binary bits, each octal digit = 3 binary bits. Expand properly using 2powers for full understanding.


Complement: A complement is a way to represent the opposite of a number.
There are two most common types of complements:

  • The RADIX Complement: The radix complement (also known as the base complement) is used to represent negative numbers in positional number systems. It is the complement of a number with respect to the base (radix) raised to the power of the number of digits in the number.

    Formula:
    R's/10's/2's Complement: Rn-N
    where,
    R = base
    n = total no of integer digit
    N = the number itself


    10's Complement:

    • Example 1: (52520)10 = (?)10
      (52520)10 = (105)10 - (52520)10 = 4748010


    • Example 2: (25.639)10 = (?)10
      (25.639)10 = (102)10 - (25.639)10 = (74.361)10


    2's Complement:

    • Example 1: (101100)2 = (?)2
      (101100)2 = (26)10 - (101100)2 = (64)10 - (101100)2 = (1000000)2 - (101100)2 = (10100)2


    • Example 2: (10111)2 = (?)2
      (10111)2 = (25)10 - (10111)2 = (32)10 - (10111)2 = (100000)2 - (10111)2 = (1001)2


  • The Dimished RADIX Complement: It’s a way to subtract numbers without borrowing, often used in computers. Instead of subtracting directly, we flip the digits in a certain way and then add.

    Formula:
    (R-1)'s/9's/1's Complement: Rn-Rm-N
    where,
    R = base
    n = total no of integer digit
    m = total no of franctional digit
    N = the number itself


    9's Complement:

    • Example 1: (52520)10 = (?)10
      (52520)10 = (105)10 - (10-0)10 - (52520)10 = 4748010


    • Example 2: (25.639)10 = (?)10
      (25.639)10 = (102)10 - (10-3)10 - (25.639)10 = (74.360)10


    1's Complement:

    • Example 1: (101100)2 = (?)2
      (101100)2 = (26)10 - (2-0)10 - (101100)2 = (1000000)2 - (1)2 - (101100)2 = (10011)2




Singed and Unsinged Number: Computers store numbers in binary (0s and 1s). When using signed numbers, one bit is used to show the sign (positive or negative). That’s why signed numbers have a smaller positive range than unsigned ones using the same number of bits.

  • Unsigned Number: All bits are used for the number. It means the number is only positive (or zero).
    Example 1: 8 bits can represent numbers from 0 to 255.
    Example 2: 4 bits can represent numbers from 0 to 15.


  • Signed Number: One bit is used for the sign (0 for positive, 1 for negative). The rest are used for the number. It means the number can be positive or negative.
    Example 1: 8 bits can represent numbers from -128 to +127.
    Example 2: 4 bits can represent numbers from -8 to +7.


Gray Code/Number: Gray Code?Number is a binary numeral system where two successive values differ in only one bit. It is used in error correction and digital communication.
Example: The binary number 1011 in Gray code is 1110.

  • Binary to Gray: convert binary to Gray code, the first bit remains the same, and each subsequent bit is obtained by XORing the current bit with the previous bit.
    Example: convert 1011 to Gray code:
    1. The first bit is 1.
    2. The second bit is 1 XOR 0 = 1.
    3. The third bit is 0 XOR 1 = 1.
    4. The fourth bit is 1 XOR 1 = 0.
    So, 1011 in Gray code is 1110.

    Binary to Gray Code Conversion

  • Gray to Binary: convert Gray code to binary, the first bit remains the same, and each subsequent bit is obtained by XORing the current bit with the previous binary bit.
    Example: convert 1110 to binary:
    1. The first bit is 1.
    2. The second bit is 1 XOR 1 = 0.
    3. The third bit is 1 XOR 0 = 1.
    4. The fourth bit is 0 XOR 1 = 1.
    So, 1110 in binary is 1011.

    Gray Code to Binary Conversion


Excess-3 Code: Excess-3 code is a non-weighted code used to express decimal numbers. It is a type of binary-coded decimal (BCD) code that adds 3 to each digit of the decimal number and then converts it to binary.
Example: The decimal number 0 in Excess-3 code is 0011.
Example: The decimal number 9 in Excess-3 code is 1100.

  • Decimal to Excess-3: convert decimal to Excess-3, add 3 to each digit of the decimal number and convert it to binary.
    Example: convert 25 to Excess-3:
    1. 2 + 3 = 5 → 0101
    2. 5 + 3 = 8 → 1000
    So, 25 in Excess-3 is 0101 1000.


  • Excess-3 to Decimal: convert Excess-3 to decimal, subtract 3 from each group of 4 bits and convert it to decimal.
    Example: convert 0101 1000 to decimal:
    1. 0101 - 0011 = 0000 → 0
    2. 1000 - 0011 = 0111 → 7
    So, 0101 1000 in decimal is 07.



BCD (Binary Coded Decimal): BCD is a binary-encoded representation of integer values that uses a 4-bit nibble to represent each digit of a decimal number. It is used in digital clocks and calculators.
Example: The decimal number 25 in BCD is 0010 0101.

  • BCD to Decimal: convert BCD to decimal, each group of 4 bits is converted to its decimal equivalent.
    Example: convert 0010 0101 to decimal:
    1. 0010 = 2
    2. 0101 = 5
    So, 0010 0101 in decimal is 25.


  • Decimal to BCD: convert decimal to BCD, each digit of the decimal number is converted to its binary equivalent.
    Example: convert 25 to BCD:
    1. 2 = 0010
    2. 5 = 0101
    So, 25 in BCD is 0010 0101.



Number Conversion Table:Decimal, Binary, Octal, Hexadecimal, Gray Code, Excess-3, BCD


DecimalBinaryOctalHexadecimalGray CodeExcess-3 CodeBCD
00000110
111111001
21022111012
31133101103
4100441101114
51015511110005
61106610110016
71117710010107
81000108110010118
91001119110111009
10101012A1111110110
11101113B1110111011
12110014C1010111112
13110115D10111000013
14111016E10011000114
15111117F10001001015

Note: The table shows the conversion of decimal numbers from 0 to 15 into their respective binary, octal, hexadecimal, gray code, excess-3 code, and BCD.
Decimal: The base-10 number system, using digits 0-9.
Binary: The base-2 number system, using digits 0 and 1.
Octal: The base-8 number system, using digits 0-7.
Hexadecimal: The base-16 number system, using digits 0-9 and A-F.
Gray Code: A binary numeral system where two successive values differ in only one bit.
Excess-3 Code: A non-weighted code used to express decimal numbers.
BCD: Binary-Coded Decimal, a class of binary encodings of decimal numbers.


➡️ Number System

  • ➡️ Number System in Digital Electronics

  • ➡️ Why Number System is Important

  • ➡️ Types of Number System

  • ➡️ Decimal Number System

  • ➡️ Binary Number System

  • ➡️ Octal Number System

  • ➡️ Hexadecimal Number System

  • ➡️ Conversion of Number System

  • ➡️ Decimal to Binary, Octal and Hexidecimal

  • ➡️ Binary, Octal and Hexadecimal to Decimal

  • ➡️ Octal and Hexadecimal to Binary

  • ➡️ Binary to Octal and Hexadecimal

  • ➡️ Octal to Hexadecimal

  • ➡️ Hexadecimal to Octal

  • ➡️ Complement

  • ➡️ RADIX Compplement

  • ➡️ Dimished RADIX Complement

  • ➡️ Singed and Unsinged Number

  • ➡️ Gray Code/Number

  • ➡️ Excess-3 Number

  • ➡️ BCD Number

➡️ Combinational Logic Circuits

  • ➡️ Combinational Logic Circuits

  • ➡️ Different Types of Logic Gates

  • ➡️ MUX, DEMUX, Encoder, Decoder

  • ➡️ Minterm, Maxterm, SOP, POS, K-Map

➡️ Sequential Logic Circuits

© SemiBD