Number Systems & Logic Gates Day 2

24
Number Systems & Logic Gates Day 2

description

Number Systems & Logic Gates Day 2. Octal Number System. Base (Radix)8 Digits0, 1, 2, 3, 4, 5, 6, 7 e.g.1623 8 1623 8 3 =5128 2 =648 1 =88 0 =1 The digit 2 in the second position from the right represents the - PowerPoint PPT Presentation

Transcript of Number Systems & Logic Gates Day 2

Number Systems & Logic GatesDay 2

Octal Number System

Base (Radix) 8

Digits 0, 1, 2, 3, 4, 5, 6, 7

e.g. 16238

1 6 2 3

83=512 8

2=64 8

1=8 8

0=1

The digit 2 in the second position from the right represents the

value 16 and the digit 1 in the fourth position from the right

represents the value 512.

Hexadecimal Number System

Base (Radix) 16

Digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,

A, B, C, D, E, F

e.g. 2F4D16

2 F 4 D

163=4096 16

2=256 16

1=16 16

0=1

The digit F in the third position from the right represents the

value 3840 and the digit D in the first position from the right

represents the value 13.

Eg. 2210 to Binary

101102

Conversions: Decimal to Binary (Integer)

Remainder

Divide integer until the integer quotient becomes 0

10110

222 5

112222

12 0

Eg. 101102 to Decimal

20 x 021 x 122 x 123 x 024 x 1

16 0 4 2 0+ + + + 22

1 0 1 1 0

Conversions: Binary to Decimal (Integer)

Eg. 13510 to Octal

2078

Conversions: Decimal to Octal (Integer)

07

2

1681358

28

0

Eg. 2078 to Decimal

2 0 780 x 781 x 082 x 2

64 2 0 7+ + 135x

Conversions: Octal to Decimal (Integer)

D

9

3

21116338516

Eg. 338510 to Hexadecimal

F

E

D

12

11

10

-

-

-

15-C

14-B

13-A

D3916

Conversions: Decimal to Hexadecimal (Integer)

1316 0

Eg. D3916 to Decimal

D 3 9 160 x 9161 x 3162 x 13

256 13 48 9+ + 338510x

F

E

D

12

11

10

-

-

-

15-C

14-B

13-A

Conversions: Hexadecimal to Decimal (Integer)

Eg. 110010111012 to Octal

5313

1 1 0 0 1 0 1 1 1 0 1

Conversions: Binary to Octal

Therefore,

110010111012 = 31358

Eg. 31358 to Binary

10101100111

3 1 3 5

Conversions: Octal to Binary

Therefore,

31358 = 110010111012

Eg. 110010111012 to Hexadecimal

D56

1 1 0 0 1 0 1 1 1 0 1

Conversions: Binary to Hexadecimal

Therefore,

110010111012 = 65D16

Eg. 65D16 to Binary

11010101110

6 5 D

Conversions: Hexadecimal to Binary

Therefore,

65D16 = 110010111012

Logic Gates• Binary information is represented in digital

computers by physical quantities called signals.

• Two different electrical voltage levels such as 3 volts and 0.5 volts may be used to represent binary 1 and 0.

• Binary logic deals with binary variables and with operations that assume a logical meaning.

Logic Gates Contd..

• A particular logic operation can be described in an algebraic or tabular form.

• The manipulation of binary information is done by the circuits called logic gates, which are blocks of hardware that produce signals of binary 1 or 0 when input logic requirements are satisfied.

Logic Gates Contd..

• Each gate has a distinct graphics symbol and it’s operation can be described by means of an algebraic expression or in a form of a truth table.

• Each gate has one or more binary inputs and one binary output.

Logic Gates

AND

OR (Inclusive OR)

NOT (inverter)

NAND (Not AND)

NOR (Not OR)

XOR (Exclusive OR)

XNOR (Exclusive NOR)

Logic Operations

ANDLogic Gate Truth Table

A

Bx A B x

0 0 00 1 01 0 01 1 1A, B Binary Input Variables

x Binary Output Variable

X=A.B

Logic Operations

OR Logic Gate Truth Table

A B x0 0 00 1 11 0 11 1 1

A

Bx

X=A+B

This is read as x equals A or B

Logic Operations

NOT Logic Gate Truth Table

A x 0 0 1 1

xA

X=A`

X=A

Logic Operations

NAND Logic Gate Truth Table

A B x0 0 10 1 11 0 11 1 0

A

Bx

X=A.B

Logic Operations

NOR Logic Gate Truth Table

A B x0 0 10 1 01 0 01 1 0

A

Bx

X=A+B

X= A + B

Logic Operations

XOR Logic Gate Truth Table

A B x0 0 00 1 11 0 11 1 0

A

Bx

Logic Operations

Exclusive-NOR

Logic Gate Truth Table

A B x0 0 10 1 01 0 01 1 1

A

Bx

X= A + B