LOGCAST
LOGIC CIRCUITS and SWITCHING THEORY
COURSE DESCRIPTION:
Review of number systems, coding and Boolean
algebra; inputs and outputs; gates and gating
networks; combinational circuits; standard form;
minimization; sequential circuits; state and
machine equivalence; asynchronous sequential
circuits; race conditions; algorithmic state
machines; design of digital subsystems
REFERENCE BOOK
DIGITAL
DESIGN
by Morris M. Mano
and Michael Ciletti
(5th Edition)
LEC 1: DIGITAL SYSTEMS
DIGITAL SYSTEMS
Generality
Ability
to represent and manipulate discrete
elements of information
PRESENT DAY DIGITAL SYSTEMS:
- Use electrical signals (voltage or current)
- 2 discrete values (binary)
NUMBER SYSTEMS
Each
system is characterized by the
number of independent digits or
symbols they use.
The
number of symbols are often
called the base, radix, modulo, or
mod.
COMMON NUMBER SYSTEMS
Binary (Base 2)
0,1
Octal (Base 8)
0,1,2,3,4,5,6,7
Decimal (Base 10)
0,1,2,3,4,5,6,7,8,9
Hexadecimal (Base 16)
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
NUMBER SYSTEM REPRESENTATION
A
number with radix r is represented by a string
of digits:
An - 1An - 2 A1A0 . A- 1 A- 2 A- m + 1 A- m
in which 0 Ai < r and . is the radix point.
The string of digits represents the power series:
i=n-1
(Number)r =
i=0
Ai r +
i
j=-1
Aj
j=-m
(Integer Portion) + (Fraction Portion)
Special Powers of 2
210 (1024) is Kilo, denoted "K"
20
2
30
2
(1,048,576) is Mega, denoted "M"
(1,073, 741,824)is Giga, denoted "G"
NUMBER SYSTEM CONVENTIONS
To indicate the type of number system used, the
radix is used as a subscript.
e.g. 10101012
6548
A216
8910
NOTE: The absence of a subscript usually denotes Decimal number
system
NUMBER-BASE CONVERSIONS
Any Number System to Decimal
b. Decimal to Any Number System
c. Hexadecimal to binary
Binary to Hexadecimal
d. Binary to Octal
Octal to Binary
a.
ANY NUMBER SYSTEM to DECIMAL
Whenever
it is desired to find the decimal
equivalent of a given number in another number
system, it is given by the SUM OF ALL THE DIGITS
MULTIPLIED BY THEIR WEIGHTS OR PLACE
VALUES. The integer and fractional parts should
be handled separately. Starting from the radix
point, the weights of different digits are r0, r1, r2
for the integer part and r1, r2, r3 for the
fractional part, where r is the radix of the
number system whose decimal equivalent needs
to be determined
Multiply by the rn where n denotes position
BASE-N to BASE-10 EXAMPLES
1. Convert 1011.12 to Decimal
1011.12
x 2-1
x 210
x2
2
x2
3
x2
=
=
=
=
=
0.5
1
2
0
8
11.5
Multiply by the rn where n denotes position
BASE-N to BASE-10 EXAMPLES
2. Convert 27.28 to
Decimal
27.28
x 8-1 =
0
x8 =
x 81 =
0.25
7
16
23.25
Multiply by the rn where n denotes position
BASE-N to BASE-10 EXAMPLES
3. Convert 4AC.816 to Decimal
4AC.816
x 160-1 =
0.5
x 16 1 =
12
x 16 =
160
x 162 = 1024
1196.5
DECIMAL TO ANY NUMBER SYSTEM
INTEGER
PART
the integer part is progressively divided by
r and the remainders noted until the result
of division yields a zero quotient. The
remainders written in reverse order
constitute the equivalent
DECIMAL TO ANY NUMBER SYSTEM
FRACTIONAL
PART
The fractional part is progressively multiplied by
r and the carry recorded until the result of
multiplication yields a zero or when the desired
number of bits has been obtained. The carry(s)
are written in forward order constitute the
equivalent of the fractional part
PROGRESSIVE DIVISION and MULTIPLICATION
BASE-10 to BASE-N Examples
1. Convert 235.5 to Binary
r
Dividend
235
117
58
29
14
0.5 x 2 = 1.0
Ans:
11101011.12
PROGRESSIVE DIVISION and MULTIPLICATION
BASE-10 to BASE-N Examples
1. Convert 99.8125 to Octal
r
Dividend
99
12
0.8125 x 8 = 6.5
0.5 x 8 = 4.0
Ans:
143.648
PROGRESSIVE DIVISION and MULTIPLICATION
BASE-10 to BASE-N Examples
1. Convert 68.75 to Hex
r
Dividend
16
68
16
16
0.75 x 16 = 12.0
Ans:
44.C16
OCTAL TO BINARY CONVERSION
For
octalbinary conversion, replace
each digit in the octal number with its
three-bit binary equivalent.
Octal to Binary Example
1 Octal digit = 3 bits
1. Convert 4568 to Binary
4568
100
101
110
Ans: 1001011102
BINARY TO OCTAL CONVERSION
For binaryoctal conversion, split the
binary number into groups of three bits,
starting from the binary point, and, if
needed, complete the outside groups by
adding Os, and then write the octal
equivalent of these three-bit groups.
3 bits = 1 Octal Digit
Binary to Octal Example
Convert 101101110112 to Octal
101101110112
2 6 7 3
Ans:
26738
HEXADECIMAL TO BINARY CONVERSION
For
hexadecimalbinary conversion,
replace each hex digit with its four-bit
binary equivalent.
1 Hexadecimal Digit = 4 bits
Hex to Binary Conversion Example
Convert 5AF16 to Binary
5AF16
0101 1010
1111
Ans:
101101011112
BINARY TO HEXADECIMAL
CONVERSION
For binaryhex conversion, split the binary
number into groups of four bits, starting
from the binary point, and, if needed,
complete the outside groups by adding Os,
and then write the hex equivalent of the
four-bit groups
4 bits = 1 Hexadecimal Digit
Binary to Hexadecimal Conversion
Convert 101110111011012 to Hex
101110111011012
2 E
Ans:
2EED16
OCTAL TO HEX
HEX TO OCTAL
For
octalhexadecimal conversion, we can go
from the given octal number to its binary
equivalent and then from the binary equivalent
to its hex counterpart. For hexadecimaloctal
conversion, we can go from the hex to its
binary equivalent and then from the binary
number to its octal equivalent.
HEX to BINARY to OCTAL
Hex to Octal Conversion Example
Convert C3F16 to Octal
C3F16
1100001111112
6 0
7 7
1100 0011 1111
ANS:
60778
OCTAL to BINARY to HEX
Octal to Hex Conversion Example
Convert 6128 to Hex
1100010102
6128
1
110
001
010
ANS:
18A16