You are on page 1of 38

SARVAJANIK COLLEGE OF ENGG.

&
TECH.

SUBJECT -: DIGITAL LOGIC CIRCUIT

BINARY SYSTEM

PRESENTED BY-:

SR NO.

NAME

EMROLLMENT NO.

1.

KISHAN BOGHARA

130420117008

2.

ELVIS COELHO

130420117012

3.

SIDDHARTH DIYORA

130420117017

4.

SUNNY DOBARIYA

130420117018

5.

TANVEER SHAIK

130420117055

6.

SAGAR VARIYA

130420117061

BINARY NUMBERS

Most modern computers systems operate using the binary logic. It cannot operate on
decimal number system.

A binary number system uses only two digits namely 0 and 1.

Binary number system works like decimal number system except one change. It uses base 2.

The binary digits ( 0 and 1) are also called bits. Thus binary system is a two bit system.

1010112 =>

1 x 20
1 x
0 x
1 x
0 x
1 x

21
22
23
24
25

Weight

The left most bit in the given binary number with the highest weight is called as MOST
SIGNIFICANT BIT (MSB) whereas the right most bit in a given number with the lowest weight
is called as LEAST SIGNIFICANT BIT (LSB).

OCTAL NUMBERS

The important features of octal number systems are as follows :

Base :- The base used for Octal Number is 8 .

The number of values assumed by each digit : Each digit in the octal system will assume 8
different values from 0 to 7 (0,1,2,3,4,5,6,7) .

The largest value of a digit : The largest value of digit in the octal number will be 7. The
largest two digit number in octal system is 77.
0

10

20

70

100

11

21

..

71

101

12

22

72

102

13

23

..

73

103

14

24

74

104

15

25

..

75

105

16

26

..

76

106

17

27

..

77

107

Largest value of digit

DECIMAL SYSTEM
Some of the important characteristics of a decimal system are :

It uses the base of 10

The largest value of a digit is 9.

Each place represent a different multiple of 10 . These multiples are also called as weighted
values.

12510 =>

Left most digit having highest weight is MSB & right most digit having lowest weight is called
as LSB.

5 x 100 =
5
2 x 101 = 20
1 x 102 = 100
Answer:= 125

Weight

HEXADECIMAL SYSTEM
The important features of a hexadecimal number system are as follows :

Base : The base is 16 .

Number of values assumed by each digit : The number of values assumed by each digit is 16 .
The values include digit 0 through 9 and letter A,B,C,D,E,F . Hence the sixteen possible values
are : 0 1 2 3 4 5 6 7 8 9 A B C D E F .

HEXADECIMAL
DIGIT

10

11

12

13

14

15

VALUES

Relation between Binary, decimal, octal & hexadecimal


Decimal (base-10)

Binary (base-2)

Octal (base-8)

Hexadecimal (base-16)

0000

0001

0010

0011

0100

0101

0110

0111

1000

10

1001

11

10

1010

12

11

1011

13

12

1100

14

13

1101

15

14

1110

16

15

1111

17

Conversion Among Bases

The possibilities:

Decimal

Octal

Binary

Hexadecimal

Binary to Decimal

Technique
n

Multiply each bit by 2 , where n is the weight of the bit

The weight is the position of the bit, starting from 0 on the right

Add the results

Example

1010112 =>

1
1
0
1
0
1

x
x
x
x
x
x

20
21
22
23
24
25

=
=
=
=
=
=

1
2
0
8
0
32
4310

Octal to Decimal

Technique
n

Multiply each bit by 8 , where n is the weight of the bit

The weight is the position of the bit, starting from 0 on the right

Add the results

Example

7248 =>

4 x 80 =
2 x 81 =
7 x 82 =

4
16
448
46810

Hexadecimal to Decimal

Technique
n

Multiply each bit by 16 , where n is the weight of the bit

The weight is the position of the bit, starting from 0 on the right

Add the results

Example

ABC16 => C x 160 = 12 x


1 =
B x 161 = 11 x 16 =
A x 162 = 10 x 256 =

12
176
2560
274810

Decimal to Binary

Technique

Divide by two, keep track of the remainder

First remainder is bit 0 (LSB, least-significant bit)

Second remainder is bit 1

Etc.

Example
12510 = ?2

2 125
2 62
2 31
2 15
7
2
3
2
1
2
0

1
0
1
1
1
1
1

12510 = 11111012

Octal to Binary

Technique

Convert each octal digit to a 3-bit equivalent binary representation

Example
7058 = ?2

111 000 101

7058 = 1110001012

Hexadecimal to Binary

Technique

Convert each hexadecimal digit to a 4-bit equivalent binary representation

Example
10AF16 = ?2

0001 0000 1010 1111

10AF16 = 00010000101011112

Decimal to Octal

Technique

Divide by 8

Keep track of the remainder

Example
123410 = ?8
8
8
8
8

1234
154
19
2
0

2
2
3
2

123410 = 23228

Decimal to Hexadecimal

Technique

Divide by 16

Keep track of the remainder

Example
123410 = ?16
16
16
16

1234
77
4
0

2
13 = D
4

123410 = 4D216

Binary to Octal

Technique

Group bits in threes, starting on right

Convert to octal digits

Example
10110101112 = ?8

1 011 010 111


1

10110101112 = 13278

Binary to Hexadecimal

Technique

Group bits in fours, starting on right

Convert to hexadecimal digits

Example
10101110112 = ?16

10 1011 1011
2

10101110112 = 2BB16

Octal to Hexadecimal

Technique

Use binary as an intermediary

Example
10768 = ?16
1

001

000

111

110

10768 = 23E16

Hexadecimal to Octal

Technique

Use binary as an intermediary

Example
1F0C16 = ?8
1

0001

1111

0000
4

1100

1F0C16 = 174148

Binary Addition (1 of 2)

Two 1-bit values

A
0
0
1
1

B
0
1
0
1

A+ B
0
1
1
10
two
pp. 36-38

Binary Addition (2 of 2)

Two n-bit values

Add individual bits

Propagate carries

E.g.,

10101
+ 11001
101110

21
+ 25
46

Multiplication (1 of 3)

Decimal (just for fun)

35
x 105
175
000
35
3675
pp. 39

Multiplication (2 of 3)

Binary, two 1-bit values

0
0
1
1

0
1
0
1

A B
0
0
0
1

Multiplication (3 of 3)

Binary, two n-bit values

As with decimal values

E.g.,

1110
x 1011
1110
1110
0000
1110
10011010

THANK YOU

You might also like