number systems & logic gates day 2. octal number system base (radix)8 digits0, 1, 2, 3, 4, 5, 6,...

24
Number Systems & Logic Gates Day 2

Upload: regina-peters

Post on 23-Dec-2015

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 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

Number Systems & Logic GatesDay 2

Page 2: 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

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.

Page 3: 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

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.

Page 4: 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

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

Page 5: 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

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)

Page 6: 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

Eg. 13510 to Octal

2078

Conversions: Decimal to Octal (Integer)

07

2

1681358

28

0

Page 7: 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

Eg. 2078 to Decimal

2 0 780 x 781 x 082 x 2

64 2 0 7+ + 135x

Conversions: Octal to Decimal (Integer)

Page 8: 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

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

Page 9: 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

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)

Page 10: 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

Eg. 110010111012 to Octal

5313

1 1 0 0 1 0 1 1 1 0 1

Conversions: Binary to Octal

Therefore,

110010111012 = 31358

Page 11: 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

Eg. 31358 to Binary

10101100111

3 1 3 5

Conversions: Octal to Binary

Therefore,

31358 = 110010111012

Page 12: 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

Eg. 110010111012 to Hexadecimal

D56

1 1 0 0 1 0 1 1 1 0 1

Conversions: Binary to Hexadecimal

Therefore,

110010111012 = 65D16

Page 13: 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

Eg. 65D16 to Binary

11010101110

6 5 D

Conversions: Hexadecimal to Binary

Therefore,

65D16 = 110010111012

Page 14: 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

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.

Page 15: 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

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.

Page 16: 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

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.

Page 17: 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

Logic Gates

AND

OR (Inclusive OR)

NOT (inverter)

NAND (Not AND)

NOR (Not OR)

XOR (Exclusive OR)

XNOR (Exclusive NOR)

Page 18: 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

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

Page 19: 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

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

Page 20: 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

Logic Operations

NOT Logic Gate Truth Table

A x 0 0 1 1

xA

X=A`

X=A

Page 21: 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

Logic Operations

NAND Logic Gate Truth Table

A B x0 0 10 1 11 0 11 1 0

A

Bx

X=A.B

Page 22: 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

Logic Operations

NOR Logic Gate Truth Table

A B x0 0 10 1 01 0 01 1 0

A

Bx

X=A+B

Page 23: 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

X= A + B

Logic Operations

XOR Logic Gate Truth Table

A B x0 0 00 1 11 0 11 1 0

A

Bx

Page 24: 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

Logic Operations

Exclusive-NOR

Logic Gate Truth Table

A B x0 0 10 1 01 0 01 1 1

A

Bx

X= A + B