0% found this document useful (0 votes)
9 views56 pages

1 and 2 (Number System and Convertion)

The document provides an overview of number systems including decimal, binary, octal, and hexadecimal, detailing their bases and digit representations. It explains how to convert between these systems using examples and formulas for both conversion to and from decimal. Additionally, it covers the significance of binary digits in digital systems and how computers process information using these number systems.

Uploaded by

riyaspam7492
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)
9 views56 pages

1 and 2 (Number System and Convertion)

The document provides an overview of number systems including decimal, binary, octal, and hexadecimal, detailing their bases and digit representations. It explains how to convert between these systems using examples and formulas for both conversion to and from decimal. Additionally, it covers the significance of binary digits in digital systems and how computers process information using these number systems.

Uploaded by

riyaspam7492
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/ 56

UNIT- 1

NUMBER SYSTEMS
& CODES
Topic 1.1
Number System &
CONVERSION
1
Prepared By -Prof. Sonali B. Jadhav
Introduction

Signals-
Types of signals
1.Analog Signals sinusoidal wave
2.Digital Signals square block wave where
there are always two levels

level 1 - 5V /
true / high

level 0 / 0V /
false / low
Digital Systems

Digital Input Digital


Signal
Digital Circuit
Output
Signal
2
HOW THE COMPUTER GETS
+1
THE ANSWER
=3
0
0 1 1 0
1
0
1
1
0 0 1

▪A computer understands
information composed of only zeros and
ones.
▪ The decimal number system is
convenient for the programmer.
▪ The computer uses binary digits for its
operation.
Radix or base- 1
MSD /
0 0 1
LSD /
MSD (Most Significant Digit)- MSB LSB

LSD (Least Significant Digit)-


Base / Radix - The number of values a particular
digit can assume is called base/ the number of
unique digits, including the digit zero, used to
represent numbers
Example - For decimal, base is 10 (0, 1, 2, 3, 4, 5,
DECIMAL
6, 7, 8, 9)
For binary , base is 2 (0, 1)
For octal , base is 8 (0, 1, 2, 3, 4, 5, 6, 7)
For hexadecimal, base is 16 (0, 1, 2, 3,
4, 5, 6, 7, 8, 9, A=10, B=11, C=12,
D=13, E=14, F=15)

BASIC HEXA
BINARY NUMBER
SYSTEM DECIMAL

OCTAL
6
DECIMAL NUMBER SYSTEM

DIGITS • 0,1,2,3,4,5,6,7,8,9.

BASE • 10

7
DECIMAL NUMBER 4598
4598 = 8 * 10^0 + 9 * 10^1 + 5 * 10^2 + 4 * 10^3

4*10 3

5*10 2

9*10 1

8*10 0 153 = 100 + 50 + 3


= 1 * 10^2 + 5 * 10^1 + 3 * 10^0

8
BINARY NUMBER SYSTEM

DIGITS •0,1

BASE •2
9
BINARY NUMBER 1011
1011 = 1 * 2^0 + 1 * 2^1 + 0 * 2^2 + 1 * 2^3

1*2
3

0*2 2

1*2 1

1*2 0

1
0
HEXADECIMAL NUMBER
SYSTEM

• 0,1,2,3,4,5,6,7,
DIGITS • 8,9,A,B,C,D,E,F.

BASE • 16

1
1
HEXADECIMAL NUMBER 1A5D
1A5D = 13 * 16^0 + 5 * 16^1 + 10 * 16^2 + 1 * 16^3
we know D = 13 and A = 10

1*16 3

A*16 2

5*16 1

D*16 0

12
OCTAL NUMBER SYSTEM

•0,1,2,3,4,
DIGITS
•5,6,7.

BASE •8

13
OCTAL NUMBER 5273
5273 = 3 * 8^0 + 7 * 8^1 + 2 * 8^2 + 5 * 8^3

5*8 3

2*8 2

7*8
1

3*8 0

14
CONVERSIONS IN BASIC 10 2 8 16
NUMBER SYSTEM ------------------------------
0 000 0 0
1 001 1 1
-----
2 010 2 2
3 011 3 3
4 100 4 4
5 101 5 5
6 110 6 6
7 111 7 7
-----
8 1000 10 8
9 1001 11 9
----
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F
------
16 10000 20 10
17 10001 21 11
15
BINARY TO DECIMAL

BIT
POSITION • 1*24+0*23+1*22 DECIMAL
• 10101 +0*21+1*20
• 54321 • 21

MUL WITH
BINARY
BASE

16
BINARY TO DECIMAL

BIT
POSITION 1*24+1*23+0*22+1*2 DECIMAL
(11010.11)2 1+0*20 +1*2-1+1*2-2
5 4 3 2 1.12 26.75

MUL WITH
BINARY
BASE

17
BINARY TO DECIMAL

BIT
POSITION 0 * 2^0 + 1 * 2^1 + DECIMAL
11100110 1 * 2^2 + 0 * 2^3 +
0 * 2^4 + 1 * 2^5 +
?? 1 * 2^6 + ?? 1 * 2^7 ??
87654321 230
MUL WITH
BINARY
BASE

18
BINARY TO DECIMAL

BIT
POSITION DECIMAL
0 * 2^0 + 1 * 2^1 +
1010.010 0 * 2^2 + 1* 2^3 +
0 * 2^(-1) + 1 * 2^(-2)
?? ??
+ 0 * 2^(-2) ??
4321.123 12.25
MUL WITH
BINARY
BASE

19
HEXADECIMAL TO DECIMAL

BIT POSITION 2 DECIMAL


5A9 • 5*16
321 +A*161 1449
+9*160
MUL WITH
HEX
BASE

20
HEXADECIMAL TO DECIMAL

BIT POSITION DECIMAL


(E5.A)16 14*161
H 2 1.1 +5*160+10* (229.625)10
16-1
MUL WITH
HEX
BASE

21
HEXADECIMAL TO DECIMAL

BIT POSITION DECIMAL


1DE 14 * 16^0 + 13 *
16^1 + 1 * 16^2
?? ??
??
321
478
HEX MUL WITH
BASE

22
HEXADECIMAL TO DECIMAL

BIT POSITION DECIMAL


6A1.2 1 * 16^0 + 10 *
16^1 + 6 * 16^2
?? ??
??
+ 2 * 16^(-1)
321.1 1697.125
HEX MUL WITH
BASE

23
OCTAL TO DECIMAL

BIT
POSITION 1 DECIMAL
2
645 6*8 +4*8
8
O
321 +5*8 0 421

MUL WITH
OCTAL BASE

24
OCTAL TO DECIMAL

BIT
POSITION 0 DECIMAL
1
33.56 3*8 +3*8
2 1.1 2 +5*8 -1 + 6*8 -2 27.718

MUL WITH
OCTAL BASE

25
OCTAL TO DECIMAL

BIT
POSITION DECIMAL
157 7 * 8^0 + 5 * 8^1
+ 1 * 8^2
?? ?? ??
321 111
MUL WITH
OCTAL BASE

26
Base 5 TO DECIMAL

BIT
POSITION DECIMAL
4  53 + 0  52 + 2
(4021.2)5 4 3 2 1.1  51 +1 50 + 2  511.4
5−1
MUL WITH
OCTAL BASE

27
Base 5 TO DECIMAL

BIT
POSITION DECIMAL
(231.3)5 ??
?? 1 * 5^0 + 3 * 5^1 + ??
321.1 2 * 5^2 + 3 * 5^(-1)
66.6
MUL WITH
OCTAL BASE

28
CONVERSION IN DECIMAL
Note-NUMBER MULTIPLY WITH BASE VALUE

Binary

octal Decimal

Hexadecimal
DECIMAL TO BINARY
DECIMAL = 34.625 convert into binary

LSB

write it from
up to down

MSB

BINARY = 100010.101
30
DECIMAL TO BINARY

Divide through out by 2

39 • Q=19
• R=1 19 • Q=9
• R=1 9 • Q=4
• R=1 4 • Q=2
• R=0 2 • Q=1
• R=0 1 • Q=0
• R=1

LSB R value Write from MSB to LSB MSB

DECIMAL = 39 Q= Quotient
BINARY = 100111 R=Remainder

31
DECIMAL TO BINARY

Divide through out by 2

10011100

156 ??

LSB MSB

DECIMAL = 156 Q= Quotient


BINARY = ?? R=Remainder

32
DECIMAL TO HEX

DECIMAL = 3509
HEX = DB5 33
DECIMAL TO HEX

Divide through out by 16

• Q=2 • Q=0
35 • R=3 2 • R=2

LSB MSB

DECIMAL = 35
HEX = 23

34
DECIMAL TO HEX

Divide through out by 16

157 9D

LSB MSB

DECIMAL =157
HEX = ??

35
DECIMAL TO OCTAL

Divide through out by 8

DECIMAL = 123
OCTAL = 173
36
DECIMAL TO OCTAL

Divide through out by 8

DECIMAL = 2980
OCTAL = 5644
37
DECIMAL TO OCTAL

Divide through out by 8

• Q=57 • Q=7 • Q=0


461 • R=5 57 • R=1 7 • R=7

LSB MSB

DECIMAL = 461
OCTAL = 715
38
DECIMAL TO OCTAL

Divide through out by 8

945 1661

LSB MSB

DECIMAL = 945
OCTAL = ??
39
CONVERSION from DECIMAL
Note-DECIMAL NUMBER DIVIDE BY BASE VALUE

Binary

octal Decimal

Hexadecimal
BINARY TO HEXADECIMAL

BINARY 4BITS DIV HEX


• (0101)(1101)(1001) • (5) (D) (9) =(5D9)16
• (010111011001)2

41
BINARY TO HEXADECIMAL

BINARY 4BITS DIV HEX


(0100)(1001).(1000) (4) (9).(8) =(49.8)
• (1001001.10)

42
BINARY TO HEXADECIMAL

BINARY 4BITS DIV HEX


?? ??
(1111001010.111101)2 (0011)(1100)(1010). 3CA.F4
(1111)(0100)

43
BINARY TO HEXADECIMAL

BINARY 4BITS DIV HEX


?? ??
• (101010101)2
(0001)(0101)(0101) 155

44
BINARY TO OCTAL

BINARY 3BIT DIV OCTAL


• (101111100) 2 • (101)(111)(100) • (5) (7) (4)
=(574)8

45
BINARY TO OCTAL

BINARY 3BIT DIV OCTAL


• (11010101.1) 2 • (011)(010)(101).(
100) =(325.4)8

46
BINARY TO OCTAL

BINARY 3BIT DIV OCTAL


• (101010101) 2 (101)(010)(101) 525
?? ??

47
HEXADECIMAL TO BINARY

HEX EXPANSION BINARY


• (5C) 16 • (0101)(1100) • (01011100)
2

48
HEXADECIMAL TO BINARY

HEX EXPANSION BINARY


• (7E) 16 ??
??
(0111)(1110) 1111110

49
OCTAL TO BINARY

OCTAL EXPANSION BINARY

• (436) • (100)(011)(110) (100011110)


8 2

50
OCTAL TO BINARY

OCTAL EXPANSION BINARY

• (752) (111)(101)(010) • (??)


8 2
??
111101010

51
HEXADECIMAL TO OCTAL

HEX • (4DF)16

EXP • (0100)(1101)(1111)

BINARY • (010011011111)2

3BIT DIV • (010)(011)(011)(111)

OCTAL • (2337)8
52
HEXADECIMAL TO OCTAL

HEX • (1EA)16

EXP • (----)(----)(----) (0001)(1110)(1010)

BINARY • (-----)2 (000111101010)

3BIT DIV • (---)(---)(---)(---) (111)(101)(010)

OCTAL • (-----)8 752

53
HEXADECIMAL TO OCTAL

HEX • (9AE1)16

EXP • (----)(----)(----)(----) (1001)(1010)(1110)(0001)

BINARY • (----------)2 (1001101011100001

3BIT DIV • (---)(---)(---)(---) (001)(001)(101)(011)(100)(001)

OCTAL • (-----)8 115381

54
OCTAL TO HEXADECIMAL

OCTAL • (456) 8

EXP • (100)(101)(110)

BINARY • (100101110)2

4BIT DIV • (0001)(0010)(1110)

HEX • (12E) 16
55
OCTAL TO HEXADECIMAL

OCTAL • (6371) 8

EXP • (---)(---)(---) (110)(011)(111)(001)

BINARY • (---------)2 (110011111001)

4BIT DIV • (----)(----)(----) (1100)(1111)(1001)

HEX • (---) 16 CF9

56

You might also like