0% found this document useful (0 votes)
6 views19 pages

Tutorial1 Number Systems and Codes

The document is a tutorial on number systems and conversions used in digital design, specifically focusing on decimal, binary, octal, and hexadecimal systems. It outlines methods for converting between these systems, including examples and calculations for binary to decimal, octal to decimal, and hexadecimal to decimal conversions. Additionally, it covers binary arithmetic operations and the process for converting decimal numbers to other bases.

Uploaded by

ajbhansali72
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views19 pages

Tutorial1 Number Systems and Codes

The document is a tutorial on number systems and conversions used in digital design, specifically focusing on decimal, binary, octal, and hexadecimal systems. It outlines methods for converting between these systems, including examples and calculations for binary to decimal, octal to decimal, and hexadecimal to decimal conversions. Additionally, it covers binary arithmetic operations and the process for converting decimal numbers to other bases.

Uploaded by

ajbhansali72
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Digital Design

(ECE/EEE/INSTR F215)

Tutorial 1
7/8/24

BITS Pilani, K.K.Birla Goa campus


Number Systems & Codes

9/12/2022 11:40 AM ANITA AGRAWAL ECE/EEE/INSTR F215 2


Types of Number systems
oDecimal
oBinary
oOctal
oHexadecimal

9/12/2022 11:40 AM ANITA AGRAWAL ECE/EEE/INSTR F215 3


Base – r to Decimal Number System
•Expand the given number in the powers of base r and
add all the terms.
•Separately convert the integer and fractional parts
•Commonly used conversions
•Binary → Decimal
• Octal → Decimal
•Hexadecimal → Decimal

9/12/2022 11:40 AM ANITA AGRAWAL ECE/EEE/INSTR F215 4


Base r
an rn + an-1 rn-1 + --- + a2 r2 + a1 r1 + a0 r0
(Integer) +
-1 -2
a-1 r + a-2 r + --- + a-m r -m
(Fraction)

9/12/2022 11:40 AM ANITA AGRAWAL ECE/EEE/INSTR F215 5


Number Base Conversion (contd.)
Convert following numbers into decimal number system
o(101101.0110)2
o(547.634)8
o(5A3F.4C9)16

9/12/2022 11:40 AM ANITA AGRAWAL ECE/EEE/INSTR F215 6


Binary to Decimal
(101101.0110)2
(101101.0110)2 = (1 x 25) + (0 x 24) + (1 x 23)
+ (1 x 22) + (0 x 21) + (1 x 20)
+ (0 x 2-1) + (1 x 2-2) + (1 x 2-3) + (0 x 2-4)
(101101.0110)2 = (45.375)10

9/12/2022 11:40 AM ANITA AGRAWAL ECE/EEE/INSTR F215 7


Octal to Decimal

(547.634)8 = (359.8047)10

Hexadecimal to Decimal

(5A3F.4C9)16 = (23103.2990)10

9/12/2022 11:40 AM ANITA AGRAWAL ECE/EEE/INSTR F215 8


Decimal to Base – r Number System
Separately convert integer and fractional parts
◦ Integer
◦ Division by r and accumulate the remainders

◦ Fraction
◦ Multiplication by r and accumulate the integers

9/12/2022 11:40 AM ANITA AGRAWAL ECE/EEE/INSTR F215 9


Base Conversion
Convert (367.625)10 to following number systems:

◦ Binary

◦ Octal

◦ Hexadecimal

9/12/2022 11:40 AM ANITA AGRAWAL ECE/EEE/INSTR F215 10


Decimal to Binary (367.625)10
Refer class notes
(367.625)10 =
(101101111.101)

9/12/2022 11:40 AM ANITA AGRAWAL ECE/EEE/INSTR F215 11


Decimal to Octal (367.625)10

(367.625)10 = (557.5)8

9/12/2022 11:40 AM ANITA AGRAWAL ECE/EEE/INSTR F215 12


Decimal to Hexadecimal (367.625)10

(367.625)10 = (16F.A)8

9/12/2022 11:40 AM ANITA AGRAWAL ECE/EEE/INSTR F215 13


Binary to Octal Conversion
Divide Binary number in group of 3 bits starting from LSB
and write their octal equivalent.
Convert (1011011010)2 into octal number system

0 0 1 0 1 1 0 1 1 0 1 0

1 3 3 2

9/12/2022 11:40 AM ANITA AGRAWAL ECE/EEE/INSTR F215 14


Octal to Binary Conversion
Replace each digit by its 3 bit equivalent.

Convert (7624)8 into Binary number.

7 6 2 4

111 110 010 100

9/12/2022 11:40 AM ANITA AGRAWAL ECE/EEE/INSTR F215 15


Binary to Hexadecimal Conversion
Divide Binary number in group of 4 bits starting from LSB
and write their hex equivalent.
Convert (1011011010)2 into hexadecimal number

0 0 1 0 1 1 0 1 1 0 1 0

2 D A

9/12/2022 11:40 AM ANITA AGRAWAL ECE/EEE/INSTR F215 16


Hexadecimal to Binary Conversion
Write down 4-bit equivalent for each hex digit

Convert (F6A4)8 into Binary number.

9/12/2022 11:40 AM ANITA AGRAWAL ECE/EEE/INSTR F215 17


Binary Arithmetic
Addition

Subtraction

18
Binary Arithmetic
Multiplication

Convert 10001010 2 to a equivalent decimal number

10001010 2 = 27 × 1 + 23 × 1 + 21 × 1
= 128 + 8 + 2
= 138 10

19

You might also like