BINARY

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 16

Number System

Computer represents its data using various types of codes.


BCD = Binary Coded Decimal
EBCDIC = Extended Binary Coded Decimal Interchange Code
ASCII= American Standard Code for Information Interchange

65-90 capital letter


97-122 small letter

These Codes are representing using various types of Number System


Lets discuss 4 popular types of Number System

1) Binary Number System (0,1) Base 2


2) Octal Number System (0,1,2,3,4,5,6,7) Base 8
3) Decimal Number System (0,1,2,3,4,5,6,7,8,9) Base 10
4) Hexa Decimal Number System (0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F)
(Base 16)

(101)16
CONVERSION TABLE
Decimal Binary Octal Hexa
0 0000 000 0
1 0001 001 1
2 0010 010 2
3 0011 011 3
4 0100 100 4
5 0101 101 5
6 0110 110 6
7 0111 111 7
8 1000 - 8
9 1001 - 9
10 1010 - A
11 1011 - B
12 1100 - C
13 1101 - D
14 1110 - E
15 1111 - F

Binary to Decimal, Octal & Hexa


Decimal to Binary, Octal & Hexa
Octal to Binary, Decimal & Hexa
Hexa to Binary, Decimal & Octal
Binary to Decimal
4 3 2 1 0
(10110)2=(?)10
= 1*24+0*23+1*22+1*21+0*20
= 16+0+4+2+0
= (22)10 1100 1100 101
10 9 8 7 6 5 4 3 2 1 0
1 1 0 0 1 1 0 0 1 0 1
= 1*210+1*29+0*28+0*27+1*26+1*25+
0*24+0*23+1*22+0*21+1*20
= 1024+512+0+0+64+32+0+0+4+0+1
= (1637)10

1 0 1 1 0
16 4 2

= (655)10 2047
1 0 1 1 1 0 0 1 1 0
512 128 64 32 4 2

Binary to Octal
(101 001 010 111 101 010 110 110 110)
= (512752666)8
(11 001 111 001 110 101 101 111 001)
Binary to Hexa
(0001 0110 1001 0111 0011 1011 1101)
= (16973BD)16

11 0010 0011 1110 1011 0110 1111


0110
Decimal to Binary
(826)10=(1100111010)2
2 826
2 413 0
2 206 1
2 103 0
2 51 1
2 25 1
2 12 1
2 6 0
2 3 0
1 1
Decimal to Octal
(826)10=(?)8
8 826
8 103 2
8 12 7
1 4
Decimal to Hexa
(6826)10=(?)16
16 6826
16 426 10
16 26 10
1 10
48858
16 4885
8
16 3053 10
16 190 13
11 14
Octal to Binary

4 2 1
1 0 1

(6542350)8=(?)2
= 110 101 100 010 011 101 000
5034162
Octal to Decimal
(325)8=(?)10
=
2 1 0
3 2 5
= 3*82+2*81+5*80
= 192+16+5
= (213)10

(5646)
Octal to Hexa
(325)8=(213)10 = (D5)16

Octal Hexa

Octal – Decimal – Hexa

16 213
13 5
= (13,5) = D5
4 2 1
Octal – Binary – Hexa 1 0 1
(325)8=( 011 010 101)
= 0 1101 0101 = (D5)16
Hexa to Binary
= (A49CE7)16= (?)2
8 4 2 1

=1010 0100 1001 1100 1110 0111


CEBEDA
1100 1110 1011 1110 1101 1010
Hexa to Decimal
(A9C)16=(2716)10
2 1 0
A 9 C
= (A*162)+(9*161)+(C*160)
= 2560+144+12
= (2716)10
FEED
Hexa ----------- not possible---------- Octal
2 Methods
a) Hexa – Decimal – Octal
b) Hexa - Binary - Octal
(65261)10 = (177355)8
8 6526
1
8 8157 5
8 1019 5
8 127 3
8 15 7
1 7

FEED
4 2 1

1 111 111 011 101 101


177355

Hexa to Decimal to Octal


(A9C)16=(2716)10 = (5234)8
8 2716
8 339 4
8 42 3
5 2

(CEBA)16=(52922)10 = (147272)8

(CEBA)16=(001 100 111 010 111 010)2 =


(147272)8
4 2 1
0 1 0

001 100 111 010 111 010


1 4 7 2 7 2
Binary to Decimal, Octal & Hexa
1) 1010101010
2) 11010101110
3) 10011111100
Decimal to Binary, Octal & Hexa
1) 654
2) 854
3) 9258
Octal to Binary, Decimal & Hexa
1) 62543
2) 54332 3) 665522

Binary Addition
1+0 = 1
0+0 = 0
0+1 = 1 1+1= 10

You might also like