Basic Information
Digital Logic Design I
Chapter 1
Digital Systems and Binary Numbers
Title: Digital Design
Code:
Lecture: 3
Pre-Requisite: Computer Introduction
Dr. Kamran Abid
Digital Logic Design Ch1-1
Digital Logic Design Ch1-2
Overall Aims of Course
Contents
By the end of the course the students will be able to:
Grasp basic principles of combinational and sequential
logic design.
Determine the behavior of a digital logic circuit
(analysis) and translate description of logical problems
to efficient digital logic circuits (synthesis).
Understanding of how to design a general-purpose
computer, starting with simple logic gates.
Topics
Contact
Hours
No. of
Weeks
-Introduction to the course content, text books,
references and course plane.
- Digital Systems and Binary numbers
- Boolean Algebra and Logic Gates
- Gate Level Minimization
- Combinational Logic
12
- Synchronous Sequential Logic
Total
45
15
Digital Logic Design Ch1-3
Digital Logic Design Ch1-4
Assessment schedule
Essential Books
Assessment Methods
First Midterm Exam
Class Participation
project
Final Exam
Total
Week
Weighting of
Assessments
35 %
Every Lecture
25 %
12
Lab
After week15
40 %
100 %
Digital Logic Design Ch1-5
DIGITAL DESIGN, by Mano M. Morris, 4th edition, Prentice-
Hall.
Recommended Books
FUNDAMENTALS OF LOGIC DESIGN, by Charles H. Roth,
Brooks/Cole Thomson Learning.
TO DIGITAL SYSTEMS, by M.D.
ERCEGOVAC, T. Lang, and J.H. Moreno, Wiley and Sons. 1998.
DIGITAL DESIGN, PRINCIPLES AND PRACTICES, by John
F.Wakely, Latest Edition, Prentice Hall, Eaglewood Cliffs, NJ.
FUNDMENTALS OF DIGITAL LOGIC WITH VHDL DESIGN,
by Stephen Brown and Zvonko Vranesic, McGraw Hill.
INTRODUCTION TO DIGITAL LOGIC DESIGN, by John
Hayes, Addison Wesley, Reading, MA.
INTRODUCTION
Digital Logic Design Ch1-6
Outline of Chapter 1
Digital Systems and Binary Numbers
1.1 Digital Systems
Digital age and information age
1.2 Binary Numbers
Digital computers
1.3 Number-base Conversions
1.4 Octal and Hexadecimal Numbers
General purposes
Many scientific, industrial and commercial applications
Digital systems
1.5 Complements
1.6 Signed Binary Numbers
1.7 Binary Codes
1.8 Binary Storage and Registers
1.9 Binary Logic
Telephone switching exchanges
Digital camera
Electronic calculators, PDA's
Digital TV
Discrete information-processing systems
Manipulate discrete elements of information
For example, {1, 2, 3, } and {A, B, C, }
Digital Logic Design Ch1-7
Digital Logic Design Ch1-8
Analog and Digital Signal
Analog to Digital
Sampling Discretization of time axix.
Analog system
The physical quantities or signals may vary continuously over a specified
range.
Quantization Discretization of Amplitude axix.
Digital system
The physical quantities or signals can assume only discrete values.
Greater accuracy
X(t)
Encoding Giving values to discrete values
X(t)
t
Analog signal
t
Discrete signalDigital Logic Design Ch1-9
Digital Logic Design Ch1-10
Binary Digital Signal
Decimal Number System
Base (also called radix) = 10
An information variable represented by physical quantity.
For digital systems, the variable takes on discrete values.
Two level, or binary values are the most prevalent values.
Binary values are represented abstractly by:
Digits 0 and 1
Words (symbols) False (F) and True (T)
Words (symbols) Low (L) and High (H)
And words On and Off
Integer & fraction
Digit Weight
V(t)
Weight = (Base)
Logic 1
-1
5 1 2
-2
7 4
Position
Magnitude
100
10
500
10
0.1 0.01
Sum of Digit x Weight
Formal Notation
Binary values are represented by values
or ranges of values of physical quantities.
10 digits { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }
Digit Position
undefine
0.7 0.04
-1
-2
d2*B +d1*B +d0*B +d-1*B +d-2*B
Logic 0
t
Binary digital signal
Digital Logic Design Ch1-11
(512.74)10
Digital Logic Design Ch1-12
Octal Number System
Binary Number System
Base = 8
Base = 2
8 digits { 0, 1, 2, 3, 4, 5, 6, 7 }
Weights
Weight = (Base)
Position
64
Magnitude
2 digits { 0, 1 }, called binary digits or bits
Weights
Sum of Digit x Weight
Formal Notation
1/8 1/64
5 1 2
7 4
-1
-1
Position
Magnitude
-2
5 *8 +1 *8 +2 *8 +7 *8 +4 *8
Weight = (Base)
-2
Sum of Bit x Weight
1/2 1/4
1 0 1
0 1
Formal Notation
-1
0
-2
-1
1 *2 +0 *2 +1 *2 +0 *2 +1 *2
Groups of bits
=(330.9375)10
4 bits = Nibble
-2
=(5.25)10
8 bits = Byte
(512.74)8
(101.01)2
1011
11000101
Digital Logic Design Ch1-13
Digital Logic Design Ch1-14
Hexadecimal Number System
The Power of 2
Base = 16
16 digits { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F }
Weights
Weight = (Base)
Position
256
Magnitude
16
1 E 5
Sum of Digit x Weight
Formal Notation
2n
2n
20=1
28=256
21=2
29=512
22=4
10
210=1024
23=8
11
211=2048
24=16
12
212=4096
25=32
20
220=1M
Mega
26=64
30
230=1G
Giga
27=128
40
240=1T
Tera
1/16 1/256
7 A
-1
-1
-2
1 *16 +14 *16 +5 *16 +7 *16 +10 *16
-2
=(485.4765625)10
(1E5.7A)16
Digital Logic Design Ch1-15
Kilo
Digital Logic Design Ch1-16
Addition
Binary Addition
Decimal Addition
Column Addition
1
+
1
Carry
= 61
= 23
= 84
+
= Ten Base
Subtract a Base
Digital Logic Design Ch1-17
(2)10
Digital Logic Design Ch1-18
Binary Subtraction
Binary Multiplication
Borrow a Base when needed
Bit by bit
1
2
= 77
= 23
= 54
= (10)2
1
x
0
Digital Logic Design Ch1-19
Number Base Conversions
Decimal (Integer) to Binary Conversion
Divide the number by the Base (=2)
Evaluate
Magnitude
Octal
(Base 8)
Evaluate
Magnitude
Take the remainder (either 0 or 1) as a coefficient
Take the quotient and repeat the division
Example: (13)10
Decimal
(Base 10)
Binary
(Base 2)
Quotient
Remainder
Coefficient
6
3
1
0
1
0
1
1
a0 = 1
a1 = 0
a2 = 1
a3 = 1
13/ 2 =
6 /2=
3 /2=
1 /2=
Hexadecimal
(Base 16)
Answer:
(13)10 = (a3 a2 a1 a0)2 = (1101)2
MSB
Evaluate
Magnitude
Digital Logic Design Ch1-21
Decimal (Fraction) to Binary Conversion
Digital Logic Design Ch1-22
Decimal to Octal Conversion
Quotient
Take the integer (either 0 or 1) as a coefficient
Take the resultant fraction and repeat the multiplication
Example: (0.625)10
175 / 8 =
21 / 8 =
2 /8=
0.625 * 2 = 1
0.25 * 2 = 0
0.5
*2= 1
.
.
.
Fraction
Coefficient
25
5
0
a-1 = 1
a-2 = 0
a-3 = 1
Coefficient
7
5
2
a0 = 7
a1 = 5
a2 = 2
(175)10 = (a2 a1 a0)8 = (257)8
Example: (0.3125)10
Integer
(0.625)10 = (0.a-1 a-2 a-3)2 = (0.101)2
0.3125 * 8 = 2
0.5
*8= 4
Answer:
MSB
Remainder
21
2
0
Answer:
Integer
LSB
Example: (175)10
Multiply the number by the Base (=2)
Answer:
Digital Logic Design Ch1-20
.
.
Fraction
Coefficient
5
0
a-1 = 2
a-2 = 4
(0.3125)10 = (0.a-1 a-2 a-3)8 = (0.24)8
LSB
Digital Logic Design Ch1-23
Digital Logic Design Ch1-24
Binary Octal Conversion
8 = 23
Octal
Binary
000
001
010
011
100
101
110
111
Each group of 3 bits represents an octal
digit
Assume Zeros
Example:
( 1 0 1 1 0 . 0 1 )2
( 2
Binary Hexadecimal Conversion
. 2 )8
Works both ways (Binary to Octal & Octal to Binary)
16 = 24
Each group of 4 bits represents a
hexadecimal digit
Assume Zeros
Example:
( 1 0 1 1 0 . 0 1 )2
(1
. 4 )16
Decimal, Binary, Octal and Hexadecimal
Example:
2 )8
Assume Zeros
Assume Zeros
( 0 1 0 1 1 0 . 0 1 0 )2
(1
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
Digital Logic Design Ch1-26
Convert to Binary as an intermediate step
( 2
Binary
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
Works both ways (Binary to Hex & Hex to Binary)
Digital Logic Design Ch1-25
Octal Hexadecimal Conversion
Hex
4 )16
Decimal
Binary
Octal
Hex
00
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
00
01
02
03
04
05
06
07
10
11
12
13
14
15
16
17
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
Works both ways (Octal to Hex & Hex to Octal)
Digital Logic Design Ch1-27
Digital Logic Design Ch1-28
1.5 Complements
There are two types of complements for each base-r system: the radix complement and
diminished radix complement.
Diminished Radix Complement - (r-1)s Complement
Given a number N in base r having n digits, the (r1)s complement of N is
defined as:
(rn 1) N
Complements
1s Complement (Diminished Radix Complement)
All 0s become 1s
All 1s become 0s
Example (10110000)2
(01001111)2
If you add a number and its 1s complement
Example for 6-digit decimal numbers:
9s complement is (rn 1)N = (1061)N = 999999N
9s complement of 546700 is 999999546700 = 453299
Example for 7-digit binary numbers:
1s complement is (rn 1) N = (271)N = 1111111N
1s complement of 1011000 is 11111111011000 = 0100111
Observation:
Subtraction from (rn 1) will never require a borrow
Diminished radix complement can be computed digit-by-digit
For binary: 1 0 = 1 and 1 1 = 0
Digital Logic Design Ch1-29
10110000
+ 01001111
11111111
Digital Logic Design Ch1-30
Complements
Complements
2s Complement (Radix Complement)
Radix Complement
Take 1s complement then add 1
Toggle all bits to the left of the first 1 from the right
Example:
Number:
1s Comp.:
OR
The r's complement of an n-digit number N in base r is defined as
rn N for N 0 and as 0 for N = 0. Comparing with the (r 1) 's
complement, we note that the r's complement is obtained by adding 1
to the (r 1) 's complement, since rn N = [(rn 1) N] + 1.
10110000
Example: Base-10[(rn 1) N ]+ 1
10110000
01001111
The 10's complement of 012398 is 987602
The 10's complement of 246700 is 753300
Example: Base-2
1
01010000
01010000
The 2's complement of 1101100 is 0010100
The 2's complement of 0110111 is 1001001
Digital Logic Design Ch1-31
Digital Logic Design Ch1-32
Complements
Complements
Subtraction with Complements
Example 1.5
The subtraction of two n-digit unsigned numbers M N in base r can be
done as follows:
Using 10's complement, subtract 72532 3250.
Example 1.6
Using 10's complement, subtract 3250 72532.
There is no end carry.
Therefore, the answer is (10's complement of 30718) = 69282.
Digital Logic Design Ch1-33
Digital Logic Design Ch1-34
Complements
Complements
Subtraction of unsigned numbers can also be done by means of the (r 1)'s
Example 1.7
Given the two binary numbers X = 1010100 and Y = 1000011, perform the
subtraction (a) X Y ; and (b) Y X, by using 2's complement.
complement. Remember that the (r 1) 's complement is one less then the r's
complement.
Example 1.8
There is no end carry.
Therefore, the answer is
Y X = (2's complement
of 1101111) = 0010001.
Digital Logic Design Ch1-35
Repeat Example 1.7, but this time using 1's complement.
There is no end carry,
Therefore, the answer is Y
X = (1's complement of
1101110) = 0010001.
Digital Logic Design Ch1-36
1.6 Signed Binary Numbers
To represent negative integers, we need a notation for negative
values.
It is customary to represent the sign with a bit placed in the
leftmost position of the number since binary digits.
The convention is to make the sign bit 0 for positive and 1 for
negative.
Example:
01001
= 9 (Unsigned binary No.)
or
+9 (Signed binary No.)
11001
= 25 (Unsigned binary No.)
or
- 9 (Signed binary No.)
No confusion in identifying the bits if the type of representation is known.
1.6 Signed Binary Numbers
Arithmetic operations implemented in a computer, it is convenient
to use a different system, the system of representation is referred
to as signed-complement system for representing negative
numbers.
In this system a negative number is represented by its complement.
Remember:
Signed magnitude system negates a number by changing its sign.
Signed complement system negates a number by taking its complement.
Positive Nos. starts with 0, so the complement will start with 1,
indicating a negative No.
Signed complement system can use 1s or 2s complement.
The representation in above example is referred to as signed
The later is most commonly used.
magnitude convention.
Where the No. consists of magnitude and a symbol ( + or -) ( 0 or 1)
Digital Logic Design Ch1-37
Digital Logic Design Ch1-38
1.6 Signed Binary Numbers
Signed Binary Numbers
Example:
Representing 9 in binary with 08 bits.
00001001
There is only one way to represent +9, however, there are three different ways
to represent -9.
1s Complement + 1
Remember: (1) Sign change, (2) Inverting values, (3) 1s
complement + 1 or leaving the first 1, invert the remaining left bits
Table 1.3 lists all possible four-bit signed binary numbers in the
three representations.
Positive values no change, negative values are represented by complements
Digital Logic Design Ch1-39
Digital Logic Design Ch1-40
Signed Binary Numbers
Arithmetic addition
The addition of two numbers in the signed-magnitude system follows the rules of
ordinary arithmetic. If the signs are the same, we add the two magnitudes and
give the sum the common sign. If the signs are different, we subtract the smaller
magnitude from the larger and give the difference the sign of the larger magnitude.
The addition of two signed binary numbers with negative numbers represented in
signed-2's-complement form is obtained from the addition of the two numbers,
including their sign bits.
A carry out of the sign-bit position is discarded.
Signed Binary Numbers
Arithmetic Subtraction
In 2s-complement form:
1.
2.
Take the 2s complement of the subtrahend (including the sign bit)
and add it to the minuend (including sign bit).
A carry out of sign-bit position is discarded.
( A) (+ B) = ( A) + (B)
( A) (B) = ( A) + (+ B)
Example: Remember + 7 = 00000111 and 2s complement should represent -7
and + 19 = 00010011 and 2s complement should represent -19
Example:
( 6) ( 13)
(11111010 11110011) 2s complement form
(11111010 + 00001101) take 2s complement of -13
00000111 (+ 7)
Digital Logic Design Ch1-41
Digital Logic Design Ch1-42
1.7 Binary Codes
Binary Codes
Digital Systems : Two distinct values or circuit elements that
have two stable states.
Binary codes needed, because binary circuits are manufactured
economically for use in computer.
An n-bit binary code is a group of n bits that assumes up to 2n
distinct combinations of 1s and 0s.
Each combination representing one element of the set that is
being coded.
A set of four elements can be coded with two bits and a set of
eight elements require three bit code.
BCD Code
A number with k decimal digits will require 4k bits in BCD.
A binary code will have some unassigned bit combinations, if the number of
elements in the set is not multiple power of 2. The 10 decimal digits form
such a set.
Decimal 396 is represented in BCD with 12bits as 0011 1001 0110, with
each group of 4 bits representing one decimal digit.
A decimal number in BCD is the same as its equivalent binary number only
when the number is between 0 and 9.
A BCD No. greater than 10 looks different from its equivalent binary No.
Although both contains 1s and 0s.
The binary combinations 1010 through 1111 are not used and have no
meaning in BCD.
Digital Logic Design Ch1-43
Digital Logic Design Ch1-44
Binary Codes
Binary Code
BCD Code
Example:
It is important to realize that BCD nos
are decimal nos not binary nos,
although they use bits in their
representation.
Difference between a decimal and
binary no. is decimal are written with
0,1,2 .9 and BCD number use
binary code 0000, 0001 .. 1001.
Consider decimal 185 and its corresponding value in BCD and binary:
BCD addition
Digital Logic Design Ch1-45
Digital Logic Design Ch1-46
Binary Code
Binary Codes
Example:
Other Decimal Codes
Consider the addition of 184 + 576 = 760 in BCD:
Binary code for decimal digits require a minimum of four bits per digit.
Many codes can be formulated by arranging four bits into 10 distinct
combinations.
Each code uses 10 out of 16 possibilities.
Remaining 6 combinations are discarded.
BCD and 2421 are weighted codes.
BCD code has weight of 8, 4, 2 and 1 e.g.
For 0110 weight is = 8 x 0 + 4 x 1 + 2 x 1 + 1 x 0 = 6
Like wise bit combination 1101 when weighed by 2421 comes to
Decimal Arithmetic: (+375) + (-240) = +135
Hint 6: using 10s of BCD
Digital Logic Design Ch1-47
2x1+4x1+2x0+1x1=7
Note in 2421 code some digits can be coded in two possible ways in 2421
like decimal 4 can be assigned to bit combination of 0100 or 1010.
Digital Logic Design Ch1-48
Binary Codes
Binary Codes
Other Decimal Codes
Other Decimal Codes
The 2421 and Excess-3 codes are example of self-complementing codes.
Such codes have the property that the 9s complement of a decimal number
is obtained directly by complementing each bit in the pattern.
Decimal 395 in excess-3 code
0110 1100 1000
9s complement of 395 is 604 as is obtained by complementing each bit
Digital Logic Design Ch1-49
1001 0011 0111
The excess-3 code is un-weighted code and has been used in old
computers.
The coded combinations is obtained from the corresponding binary value
plus 3.
Note: BCD code is not self-complementing .
8, 4, -2, -1 code is an example of assigning both +ve and ve weights to a
decimal code. 0110 represents 2 decimal value.
Digital Logic Design Ch1-50
Binary Codes)
Binary Codes
Gray Code
The advantage is that only bit in the
code group changes in going from
one number to the next.
Un-weighted, non-arithmetic code.
Error detection.
Representation of analog data.
Low power design.
Binary to Gray-Code Conversion
The MSB in GC is the same as the
corresponding MSB in the Binary
Number.
Going from left to Right, add each
adjacent pair of binary code bits to
get the next Gray Code bit. Discard
carries.
Gray Code
Gray-Code to Binary Conversion
The MSB in Binary Code is the
same as the corresponding MSB
in the Gray Code.
Add each binary code bit
generated to the Gray Code bit in
the next adjacent position, discard
carries.
Digital Logic Design Ch1-51
Digital Logic Design Ch1-52
Binary Codes
Binary Codes
Gray code is used in applications where normal sequence of
binary numbers may produce error or ambiguity.
Binary to Gray Code
0
A typical application of Gray Code is representation of analog
data by a continuous change in the angular position of a shaft.
0
Gray Code to Binary
0
1
+
1
+
Shaft is partitioned into segments.
Each segment is assigned a number.
If adjacent segments are made to correspond with the Gray-Code sequence
+
0
The ambiguity is eliminated between the angle of the shaft
and the value encoded by the sensor.
Digital Logic Design Ch1-53
Digital Logic Design Ch1-54
Binary Codes
Binary Codes
American Standard Code for Information Interchange (ASCII) Character Code
Digital Computers require handling of numbers, characters, or symbols such as
alphabets.
To represent these all it is needed to represent them with binary code
The same binary code is also needed to represent numerals and special characters
like $, etc.
American Standard Code for Information Interchange (ASCII) Character Code
10 decimal digits, 26 letters, and special characters. Elements range
between 36 and 64, if only capital letters are included.
Or in between 64 and 128 if both lower and upper case letters are
needed.
We therefore need 6 bit or 7 bit binary code to represent these
combinations.
Seven bits with b1, b2,.. b7. b7 most significant bit in table
1.7 the letter A is represented by ASCII as 1000001 (Col 100, Row
0001)
Digital Logic Design Ch1-55
Digital Logic Design Ch1-56
Binary Codes
Binary Codes
ASCII Character Code
Control characters are used for routing data and arranging the
ASCII Character Code
printed text into prescribed format.
Types of Control Characters:
Format Effectors
To control the format of printing, include backspace (BS),
carriage return (CR)
Information Separator
Separate the data into divisions
Communication Control Characters.
e.g. paragraphs & pages.
Useful during the transmission of text between remote
terminals. e.g. start & end of text STX & ETX
ASCII, 7 bit code often used to store on one byte, where MSB is 1, are
used for symbols of greek and italic type fonts
Digital Logic Design Ch1-57
Digital Logic Design Ch1-58
ASCII Character Codes
ASCII Properties
American Standard Code for Information Interchange (Refer to
Table 1.7)
A popular code used to represent information sent as characterbased data.
It uses 7-bits to represent:
ASCII has some interesting properties:
Digits 0 to 9 span Hexadecimal values 3016 to 3916
Upper case A-Z span 4116 to 5A16
Lower case a-z span 6116 to 7A16
Lower to upper case translation (and vice versa) occurs by flipping bit 6.
94 Graphic printing characters.
34 Non-printing characters.
Some non-printing characters are used for text format (e.g. BS =
Backspace, CR = carriage return).
Other non-printing characters are used for record marking and
flow control (e.g. STX and ETX start and end text areas).
Digital Logic Design Ch1-59
Digital Logic Design Ch1-60
Binary Codes
Binary Codes
Error-Detecting Code
Error-Detecting Code
To detect errors in data communication and processing, an eighth bit is
sometimes added to the ASCII character to indicate its parity.
A parity bit is an extra bit included with a message to make the total
number of 1's either even or odd.
Example:
Consider the following two characters and their even and odd parity:
Redundancy (e.g. extra information), in the form of extra bits, can be
incorporated into binary code words to detect and correct errors.
A simple form of redundancy is parity, an extra bit appended onto the code
word to make the number of 1s odd or even. Parity can detect all singlebit errors and some multiple-bit errors.
A code word has even parity if the number of 1s in the code word is even.
A code word has odd parity if the number of 1s in the code word is odd.
Example:
(even parity)
Message A: 100010011
Message B: 10001001 0 (odd parity)
Digital Logic Design Ch1-61
1.8 Binary Storage and Registers
Digital Logic Design Ch1-62
A Digital Computer Example
Registers
A binary cell is a device that possesses two stable states and is capable of storing
one of the two states.
A register is a group of binary cells. A register with n cells can store any discrete
quantity of information that contains n bits.
n cells
2n possible states
CPU
A binary cell
Two stable state
Store one bit of information
Examples: flip-flop circuits, ferrite cores, capacitor
Inputs: Keyboard,
mouse, modem,
microphone
A register
Memory
A group of binary cells
AX in x86 CPU
Control
unit
Datapath
Outputs: CRT,
LCD, modem,
speakers
Input/Output
Register Transfer
Synchronous or
Asynchronous?
A transfer of the information stored in one register to another.
One of the major operations in digital system.
An example in next slides.
Digital Logic Design Ch1-63
Transfer of information
Digital Logic Design Ch1-64
Transfer of information
The other major component
of a digital system
Circuit elements to
manipulate individual bits of
information
Load-store machine
LD
LD
ADD
SD
Figure 1.1 Transfer of information among register
Digital Logic Design Ch1-65
Figure 1.2 Example of binary information processing
R1;
R2;
R3, R2, R1;
R3;
Digital Logic Design Ch1-66
1.9 Binary Logic
Binary Logic
Definition of Binary Logic
Binary logic consists of binary variables and a set of logical operations.
The variables are designated by letters of the alphabet, such as A, B, C, x, y, z, etc,
with each variable having two and only two distinct possible values: 1 and 0,
Three basic logical operations: AND, OR, and NOT.
Truth Tables, Boolean Expressions, and Logic Gates
AND
OR
NOT
z=xy=xy
z=x+y
z = x = x
Digital Logic Design Ch1-67
Digital Logic Design Ch1-68
Switching Circuits
Binary Logic
Logic gates
AND
OR
Example of binary signals
3
Logic 1
2
Un-define
1
Logic 0
0
Figure 1.3 Example of binary signals
Digital Logic Design Ch1-69
Binary Logic
Binary Logic
Logic gates
Digital Logic Design Ch1-70
Logic gates
Graphic Symbols and Input-Output Signals for Logic gates:
Graphic Symbols and Input-Output Signals for Logic gates:
Fig. 1.4 Symbols for digital logic circuits
Fig. 1.6 Gates with multiple inputs
Fig. 1.5 Input-Output signals for gates
Digital Logic Design Ch1-71
Digital Logic Design Ch1-72
Quiz 1
Quiz 1
What is the largest binary number that can be represented with 14
bits.
Convert the Hexadecimal No. 68BE to binary and then binary to
octal.
Express the following numbers in decimal.
(10110.0101)2
(26.24)8
(FAFA)16
11011010
01110110
00000000
25000000
Find the 16s complement of B2FA
X = 1010100 and Y = 1000011
Perform subtraction
X-Y
Y-X using
Using 2s complement form
Using 1s complement form
Write signed magnitude, signed 1s complement and signed 2s
complement of -2, -4, -6 and -7
Obtain the 9s and 10s complement of the following.
complement form.
Two binary Nos.
Obtain 1s and 2s complement of the following
Perform arithmetic subtraction of ( 6) ( 13) using 2s
Digital Logic Design Ch1-73
Digital Logic Design Ch1-74