ECE101: Digital System Design: Unit I
ECE101: Digital System Design: Unit I
ECE101: Digital System Design: Unit I
Unit I: Lecture 2
Number Systems
Dr.R.EZHILARASIE
Assistant Professor
School of Computing
SASTRA Deemed to be University
1
Objectives
• To convert the given number from one number system to other number system
Eg. Binary → Decimal , Decimal → Binary , Binary→ Hexadecimal, Decimal → Octal etc.,
2
Objectives
• To convert the given number from one number system to other number system
Eg. Binary → Decimal , Decimal → Binary , Binary→ Hexadecimal, Decimal → Octal etc.,
3
Outcomes
4
Number System
• Contains two part: Integer & Fractional and separated by a radix point
5
Decimal Number System
• Decimal number system contain ten digits: 0 through 9
• E.g. 34.23
6
Binary Number System
• Uses two digits 0 and 1 : Base two system
• 0 and 1:bits
• E.g. 1101.011
7
Octal Number System
• Uses eight digits 0 through 7 : Base eight system
…
. …
= 56+3+0.25+0.078
= 59.3210
8
Hexadecimal Number System
• Uses 16 digits 0 through 9 plus A,B,C,D,E,F : Base sixteen system
= 32+10+0.189+0.004= 42.19310
9
Number Conversion
• Human uses decimal number system but computer uses binary number system: Decimal to Binary
10
Decimal to Binary / Octal / Hexadecimal
Steps:
1. Divide the integer part of decimal number by desired base , store the quotient and remainder
2. Consider quotient as a new decimal number and repeat step 1 until quotient becomes 0
3. List the remainders in the reverse order
E.g. 34
11
Decimal to Binary / Octal / Hexadecimal
12
Decimal fractions to Binary / Octal/ Hexadecimal
Steps:
1. Multiply the fractional part of decimal number by desired base
2. Record the integer part of product as carry and fractional part as new fractional part
3. Repeat steps 1 and 2 until fractional part of product becomes zero or desired digits are obtained.
4. Read Carries downwards to get desired base
E.g. 0.65
13
Decimal fractions to Binary/ Octal / Hecxadecimal
14
Binary to Decimal: Octal to Decimal: Hexadecimal to Decimal
Step:
• Sum of all digits multiplied by their weights (in a power of desired base) gives the
decimal equivalent
15
Binary to Octal
Octal Digit 0 1 2 3 4 5 6 7
Binary 000 001 010 011 100 101 110 111
Steps
• Make group of 3-bits starting from LSB for integer and MSB for fractional part, by adding 0s at the
end if required
• Convert each 3-bit group to the equivalent octal digit
• E.g. (11001.101011)2
16
Binary to Hexadecimal
Dec 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Hex 0 1 2 3 4 5 6 7 8 9 A B C D E F
Bin 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
Steps
• Make group of 4-bits starting from LSB for integer part and MSB for fractional part, by adding 0s at
the end if required
• Convert each 4-bit group to the equivalent hexadecimal digit
• E.g.(11001.101011)2
17
Octal to Binary
Octal Digit 0 1 2 3 4 5 6 7
Binary 000 001 010 011 100 101 110 111
Steps:
• Write equivalent 3-bit binary number for each octal digit
• Remove any leading or trailing zeros
• E.g. 246.71
18
Octal to Hexadecimal
Steps:
• Convert Octal → Binary
• Convert Binary → Hexadecimal equivalent
• E.g. 246.71
19
Hexadecimal to Binary
Steps:
• Write equivalent 4-bit binary number for each hexadecimal digit
• Remove any leading or trailing zeros
• Eg: 24A
20
Hexadecimal to Octal
Steps:
• Convert Hexadecimal → Binary
• Convert Binary → Octal equivalent
• Eg: 24A
21
Summary
• Number Conversions
22
Thank You
23