DDModule1
DDModule1
Lab Evaluation
Quiz - 10 Marks
30 Marks
Total
100 Marks
1/14/2025
1/14/2025 1 1
Number systems
❑ In digital electronics, the number system is used for representing the information.
❑ The number system has different bases and the most common of them are the Decimal,
Binary, Octal, and Hexadecimal.
❑ The Base or Radix of the number system is the total number of the digit used in the number
system. Suppose if the number system representing the digit from 0 – 9 then the base of the
system is the 10.
1/14/2025 2
Decimal Number System
Example
Characteristics: (2586)10 = (2 x 103) + (5 x 102) + (8 x101) + (6x100)
• A positional number system has 10 = 2000 + 500 + 80 + 6
1/14/2025 3
Binary Number System
Characteristics:
• A positional number system has only 2 symbols or digits (0 and 1). Hence its
base = 2
• The maximum value of a single digit is 1 (one less than the value of the base)
• Each position of a digit represents a specific power of the base (2)
• This number system is used in computers
Example:
(10101)2 = (1 x 24) + (0 x 23) + (1 x 22) + (0 x 21) x (1 x 20)
= 16 + 0 + 4 + 0 + 1
= (21)10
1/14/2025 4
LSB vs MSB
1/14/2025 5
Octal Number System
Characteristics:
• A positional number system has total 8 symbols or digits Hence, its base = 8 (0,
1, 2, 3, 4, 5, 6, 7).
• The maximum value of a single digit is 7 (one less than the value of the base
• Each position of a digit represents a specific power of the base (8)
• Since there are only 8 digits, 3 bits (23 = 8) are sufficient to represent any octal
number in binary
Example
(2057)8 = (2 x 83) + (0 x 82) + (5 x 81) + (7 x 80)
= 1024 + 0 + 40 + 7
= (1071)10
1/14/2025 6
Hexadecimal Number System
Characteristics:
• A positional number system has total 16 symbols or digits (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C,
D, E, F). Hence its base = 16
• The symbols A, B, C, D, E and F represent the decimal values 10, 11, 12, 13, 14 and 15
respectively
• The maximum than the value of a single digit is 15 (one less of the base)
• Each position of a digit represents a specific power of the base (16)
• Since there are only 16 digits, 4 bits (24 = 16) are sufficient to represent any hexadecimal
number binary.
Example:
(1AF)16 = (1 x 162) + (A x 161) + (F x 160)
=1 x 256 + 10 x 16 + 15 x 1
= 256 + 160 + 15 = (431)10
1/14/2025 7
Decimal Vs Binary Vs Octal Vs Hexadecimal
1/14/2025 8
Decimal Vs Binary Vs Octal Vs Hexadecimal
1/14/2025 9
Conversion Across the Number Systems
2510 = 110012 = 318 = 1916
1/14/2025 10
1. Binary ➔ Decimal:
1/14/2025 11
2. Octal ➔ Decimal:
1/14/2025 12
3. Hexadecimal➔ Decimal
1/14/2025 13
4. Decimal ➔ Binary
1/14/2025 14
5. Octal ➔ Binary
1/14/2025 15
6. Hexadecimal ➔ Binary
1/14/2025 16
7. Decimal ➔ Octal
1/14/2025 17
8. Decimal ➔ Hexadecimal
1/14/2025 18
9. Binary➔ Octal
1/14/2025 19
10. Binary ➔ Hexadecimal
1/14/2025 20
11. Octal➔ Hexadecimal
1/14/2025 21
12. Hexadecimal➔ Octal
1/14/2025 22
Why Binary Arithmetic's?
• A Computer understands only Binary
• The Arithmetic and Logical operation is done also in Binary
3+5 =8
1 1 0
0 0 0...... 0 1 1 1 two = 7ten
+ 0 0 0...... 0 1 1 0 two = 6ten
= 0 0 0 . . . . . . 1 (1)1 (1)0 (0)1 two = 13ten
2. Binary Subtraction
• Bitwise:
• 0-0= 0
• 0 - 1 = (1)1
• 1-0= 1
• 1-1= 0
• Direct Subtraction:
1000
0000 partial products
0000
1000
____________
1 0 0 1 0 0 0two = 72ten
4. Binary Division
• Bitwise:
• 0 / 0 = not defined
• 0/1= 0
• 1 / 0 = not defined
• 1/1= 1
• Direct Division:
Exercise
1) 1111 + 1010 Ans: 11001
2) 1101 – 1001 Ans: 0100
3) 1001 – 0111 Ans: 0010
4) 1011 * 1101 Ans: 10001111
5) 11001 / 101 Ans: 101
Application of Complements:
Subtraction
Complements
❑ Why Complements ?
✓To simplify the subtraction operation and for logical manipulation
✓Computer does not directly subtract, it adds…
❑ Two Types of Complements
1) (r-1)’s complement
Diminished Radix Complement = (rn - 1) - N
2) r’s complement rn - N for N 0 and
Radix Complement =
0 for N = 0
(rn - 1) - N
• Hence in computing system: there exists
• 9’s complement
• 7’s complement
• 1’s complement
• 15’s complement
(r-1)’s Complements
• Example (rn - 1) - N
1000000002
- 011100112
----------------
100011012
Numbers/letters/Words
+ /10101100
-/*/?
• (Information) (Digital Codes)
Process ins Called
ENCODING
Codes Classification
Binary Codes are broadly classified into five groups
1/14/2025 56
Example: Gray Code to Binary Conversion Circuit Diagram
1/14/2025 abhimanyu.bar@bennett.edu.in 57
Conversion of Excess-3 to BCD(8421)
1/14/2025 58
BCD(8421) to Excess-3 Conversion
1/14/2025 59
Excess-3 to BCD Conversion
1/14/2025 60