LEC 01(Number System)(Decimal,Octal,Hexadecimal,Binary)

fourthyearproject 26 views 21 slides Jun 05, 2024
Slide 1
Slide 1 of 21
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21

About This Presentation

Number System


Slide Content

Digital Logic Design
CSE-2215

LEC 01

Number System
Decimal: 0 1 2 3 4 5 6 7 8 9
(10 symbols)
Octal:0 1 2 3 4 5 6 7
(8 symbols)
Hexadecimal: 0 1 2 3 4 5 6 7 8 9 A B C D E F
(16 symbols)
Binary: 0 1
(2 symbols)

Decimal Number System
Decimal: 0 1 2 3 4 5 6 7 8 9
(10 symbols)
0 1 2 3 4 5 6 7 8 9
10 11 12 13 14 15 16 17 18 19
20 21 22 23 24 25 26 27 28 29
30 31 32 33 34 35 36 37 38 39
40 ….

Octal Number System
Octal:0 1 2 3 4 5 6 7
(8 symbols)

0 1 2 3 4 5 6 7
10 11 12 13 14 15 16 17
20 21 22 23 24 25 26 27
30 31 32 33 34 35 36 37
40 ….

Hexadecimal Number System
Hexadecimal: 0 1 2 3 4 5 6 7 8 9 A B C D E F
(16 symbols)
0 1 2 3 4 5 6 7 8 9 A B C D E F
10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
30 313 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F
40 . . .

Binary Number System
Binary: 0 1
(2 symbols)

0 1 10 11 100 101 110 111 1000 1001 1010 1011
1100 1101 1110 1111…..

Number-Base Conversion
(X)
b :
Here X is the number and b is the base of that
number.


(7)
10
in decimal is 7 in decimal.
(111)
2
in binary is 7 in decimal.
(17)
8
in octal is 15 in decimal.
(B)
16
in hexadecimal is 11 in decimal.

Binary Number

Decimal to Binary Process

Decimal to Binary
Convert (10)
10
to binary.


(10)
10
= (1010)
2

Decimal to Binary
Convert (27)
10
to binary.
(27)
10
= (11011)
2

Decimal to Binary Process
We need to convert a fractional decimal number to
fractional binary.
(6.6875)
10
= (?)
2

We already know how the whole number is converted.
(6)
10
= (110)
2

What about the fraction part?
(0.6875)
10
= (?)
2

Decimal to Binary Process
(0.6875)
10
= (?)
2

The process is
0.6875 x 2 = 1.375 = 0.375 + 1
0.375 x 2 = 0.75 = 0.75 + 0
0.75 x 2 = 1. 5 = 0. 5 + 1
0.5 x 2 = 1.0 = 0.0 + 1

(0.6875)
10
= (0.1011)
2

Decimal to Binary Process
(0.875)
10
= (?)
2






(0.875)
10
= (0.111)
2

Decimal to Binary Process
(0.5625)
10
= (?)
2








(0.5625)
10
= (0.1001)
2

Let’s practice a few more
(33.9375)
10
= (?)
2

Binary to Decimal Process
Binary: 1 1 0 0 0 0


Decimal:(1x2
5
)+(1x2
4
)+(0x2
3
)+(0x2
2
)+(0x2
1
)+(0x2
0
)
= 32 + 16 + 0 + 0 + 0 + 0
= 48

Binary to Decimal Process
Binary: 1 0 1 1 0 0


Decimal:(1x2
5
)+(0x2
4
)+(1x2
3
)+(1x2
2
)+(0x2
1
)+(0x2
0
)
= 32 + 0 + 8 + 4 + 0 + 0
= 44

Binary to Decimal Process
Binary: 1 0 1 . 0 1 1


Decimal:(1x2
2
)+(0x2
1
)+(1x2
0
). (0x2
-1
)+(1x2
-2
)+(1x2
-3
)
= (4 + 0 + 1) + (0.0 + 0.25 + 0.125)
= 5.375

Bin. To Dec. Quickly for small numbers




Just add the numbers corresponding to the 1s and
ignore the 0s.
(100101)
2
= (32 + 4 + 1)
10
= (37)
10

Complement a binary number
Complementing a number: Flip all the 0s to 1s and
all the 1s to 0s.
A binary number:1001001
Complement ofabove:0110110
Tags