460 likes | 746 Views
Number Systems & Logic Gates Day 2. Octal Number System. Base (Radix) 8 Digits 0, 1, 2, 3, 4, 5, 6, 7 e.g. 1623 8 1 6 2 3 8 3 =512 8 2 =64 8 1 =8 8 0 =1 The digit 2 in the second position from the right represents the
E N D
Octal Number System Base (Radix) 8 Digits 0, 1, 2, 3, 4, 5, 6, 7 e.g. 16238 1 6 2 3 83=512 82=64 81=8 80=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 162=256 161=16 160=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.
2 22 2 11 0 101102 2 5 1 2 2 1 0 2 1 1 0 Conversions: Decimal to Binary (Integer) Eg. 2210 to Binary Remainder Divide integer until the integer quotient becomes 0
1 0 1 1 0 Conversions: Binary to Decimal (Integer) Eg. 101102 to Decimal 24 x 1 23 x 0 22 x 1 21 x 1 20 x 0 22 16 0 4 2 0 + + + +
8 135 2078 8 16 7 0 8 2 2 0 Conversions: Decimal to Octal (Integer) Eg. 13510 to Octal
Conversions: Octal to Decimal (Integer) Eg. 2078 to Decimal 2 0 7 82 x 2 81 x 0 80 x 7 135 64 2 0 7 x + +
A - 10 D - 13 B - 11 E - 14 C - 12 F - 15 D3916 Conversions: Decimal to Hexadecimal (Integer) Eg. 338510 to Hexadecimal 16 3385 16 211 9 3 16 13 0 D
A - 10 D - 13 B - 11 E - 14 C - 12 F - 15 Conversions: Hexadecimal to Decimal (Integer) Eg. D3916 to Decimal D 3 9 162 x 13 161 x 3 160 x 9 338510 256 13 48 9 x + +
Conversions: Binary to Octal Eg. 110010111012 to Octal 1 1 0 0 1 0 1 1 1 0 1 5 3 1 3 Therefore, 110010111012 = 31358
Conversions: Octalto Binary Eg. 31358 to Binary 3 1 3 5 11 001 011 101 Therefore, 31358 = 110010111012
Conversions: Binary to Hexadecimal Eg. 110010111012 to Hexadecimal 1 1 0 0 1 0 1 1 1 0 1 6 5 D Therefore, 110010111012 = 65D16
Conversions: Hexadecimalto Binary Eg. 65D16 to Binary 6 5 D 110 0101 1101 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)
A x A B x 0 0 0 0 1 0 1 0 0 1 1 1 B Logic Operations AND Logic Gate Truth Table X=A.B A, BBinary Input Variables xBinary Output Variable
A B x 0 0 0 0 1 1 1 0 1 1 1 1 A x B Logic Operations OR Logic Gate Truth Table X=A+B This is read as x equals A or B
x A A x 0 0 1 1 Logic Operations NOT Logic Gate Truth Table X=A` X=A
A B x 0 0 1 0 1 1 1 0 1 1 1 0 A x B Logic Operations NAND Logic Gate Truth Table X=A.B
A B x 0 0 1 0 1 0 1 0 0 1 1 0 A x B Logic Operations NOR Logic Gate Truth Table X=A+B
A B x 0 0 0 0 1 1 1 0 1 1 1 0 A x B Logic Operations XOR Logic Gate Truth Table X= A + B
A B x 0 0 1 0 1 0 1 0 0 1 1 1 A x B Logic Operations Exclusive-NOR Logic Gate Truth Table X= A + B