Search for notes by fellow students, in your own course and all over the country.
Browse our notes for titles which look like what you need, you can preview any of the notes via a sample of the contents. After you're happy these are the notes you're after simply pop them into your shopping cart.
Title: Digital Techniques
Description: For Computer,Electrical Engineers 2nd Year
Description: For Computer,Electrical Engineers 2nd Year
Document Preview
Extracts from the notes are below, to see the PDF you'll receive please use the links above
Digital
Techniques
Lecture 1
1st Class
Digital Techniques
Digital Computer and Digital System:
Digital computer is a part of digital system, it based on binary system
...
CU is the Control Unit
...
The processor when combined with the control unit form a component
referred to as CPU
...
The processor unit performs arithmetic and other data processing tasks as
specified by the program
...
The program and data prepared by the user are transformed into the memory
unit by means of input devices such as: punch-card reader, keyboard and
scanner …etc
...
Binary System:
Since most of the electronic circuit used to contract digital computer are in herently
binary in operation
...
The binary system is the
language of digital computer
...
+ an 2n
Where each coefficient can take only two value either 0 or 1
...
EX: N=2 bits, can take 22 = 4 values, varying from 0
...
The
most familiar number system is the decimal system that uses 10 basic symbols
...
Radix
2
8
10
16
Number System
Binary
Octal
Decimal
Hexadecimal
Basic digits
0, 1
0, 1,2,3,4,5,6,7
0,1,2,3,4,5,6,7,8,9
0,1,2,3,4,5,6,7,8,9,10,A,B,C,D,E,F
Number representation:
Binary Number: the decimal number can be present in binary by arranging
the 1 and 0 under weight of the binary system to get the decimal number
...
25
Decimal
4
12
22
0
0
0
16
24
8
23
4
22
2
21
1
20
0
0
1
0
1
0
1
1
1
0
0
1
0
0
0
Octal Number: the decimal number can be present in Octal by arranging
basic digits according to the octal system to get the decimal number
...
83 82
Decimal
4
54
90
0
0
0
0
0
1
8
81
1
80
0
6
3
4
6
2
Hexadecimal: the decimal number can be present in hexadecimal by
arranging basic digits according to the weight of the hexadecimal system to
get the decimal number
...
163 162 161 160
Decimal
4
25
45
284
0
0
0
0
0
0
0
1
0
1
2
1
4
9
D
C
Digital
Techniques
Lecture 2
1st Class
Digital Techniques
Number Conversions:
The general number system can be written as shown in this equation:
An xn + … + A1 x1 + A0 x0
...
Binary to Decimal conversion:
EX:
• ( 110 )2
( ? )10
1 × 22 + 1 × 21 + 0 × 20 = 6
The answer is ( 6 )10
• ( 1011
...
1 × 2-1 + 1 × 2-2 + 0 × 2-3 + 0 × 2-4 = 11
...
75 )10
Decimal to Binary conversions:
EX:
•
( ? )2
( 50 )10
The answer is (110010)2
• ( 0
...
1011)2
Binary to Octal conversions: each three bits from right to left represent a number
...
Binary to Hexadecimal conversions: each four bits from right to left represent a
number
...
Octal to Decimal conversions:
Decimal to Octal conversions:
Hexadecimal to decimal conversions:
EX:
Decimal to Hexadecimal conversions:
Digital
Techniques
Lecture 3
1st Class
Digital Techniques
Complement:
Complement is used in digital computer to simplify the subtraction operation and for
logical manipulation
...
The r's complement
...
The (r-1)’s complement
...
3267)10 is:
1− 0
...
6733
EX: The 2's complement of (101100)2 is:
26 – 101100 = 1000000 – 101100 = 010100
The (r – 1) Complement:
The equation for (r−1) is:
rn – r-m – N
EX: The 9's complement of (25
...
639 = 74
...
If an end carry does not occur, take r complement of the number
obtained in step 1
...
And if an end carry does not
occur, take the (r – 1)'s of the number obtained in step 1 and place a negative sign in
front
...
Digital
Techniques
Lecture 4
1st Class
Digital Techniques
Codes:
Three types of code will be considered:
1
...
2
...
3
...
Binary Codes for Decimal Digits
Internally, digital computers operate on binary numbers
...
g
...
Input is done in decimal then converted to binary for internal processing
...
To be handled by digital processors, the decimal input (output) must be coded in
binary in a digit by digit manner
...
Thus, we need a specific code for each of the 10 decimal digits
...
The shown table gives several common such codes
...
The BCD code requires 4 bits to represent the 10 decimal digits
...
The position weights of the BCD code are 8, 4, 2, 1
...
An example of a non-weighted code is the excess-3 code where digit codes are
obtained from their binary equivalent after adding 3
...
Example Converting (13)10 into binary, we get 1101, coding the same number into
BCD, we obtain 00010011
...
Answer {(1011111)2, and 10010101}
Error-Detection Codes
Binary information may be transmitted through some communication medium,
e
...
using wires or wireless media
...
To be able to detect errors at the receiver end, the sender sends an extra bit (parity
bit) with the original binary message
...
If the parity bit makes the total number of 1’s an odd (even) number, it is called
odd (even) parity
...
At the receiver end, an error is detected if the message does not match have the
proper parity (odd/even)
...
No error is detectable if the transmitted message has 2 bits in error since the total
number of
1’s will remain even (or odd) as in the original message
...
Error-Detection Codes
Binary information may be transmitted through some communication medium,
e
...
using wires or wireless media
...
To be able to detect errors at the receiver end, the sender sends an extra bit (parity
bit)
...
For Gray code, successive code words differ by only one bit from one to the next
as shown in the table and further illustrated in the Figure
...
1 INTRODUCTION
The logic gate is the basic building block in digital systems
...
Gates are therefore referred to as binary logic gates
...
In this lecture, a HIGH
voltage will mean a binary 1
...
Remember that
logic gates are electronic circuits
...
All digital systems are constructed by using only three basic logic gates
...
This chapter deals with
these very important basic logic gates, or functions
...
2 THE AND GATE
The AND gate is called the “all or nothing” gate
...
5
...
The lamp (Y) will light only when both input switches (A and B) are closed
...
5
...
The table in this figure is called a truth table
...
Fig
...
1
2
The standard logic symbol for the AND gate is drawn in Fig
...
2a
...
The output is shown as Y
...
The truth table for the 2-input AND gate is shown in Fig
...
2b
...
Note that only when both input A and input B are 1
will the output be 1
...
Binary 1 is
defined as a HIGH voltage
...
Boolean algebra is a form of symbolic logic that shows how logic gates
operate
...
The Boolean expression for the circuit in Fig
...
2 is
Fig
...
2
A-B=Y
The Boolean expression is read as A AND (
...
The
dot (a) means the logic function AND in Boolean algebra, not multiply as in regular
algebra, Sometimes the dot (-) is left out of the Boolean expression
...
3
The laws of Boolean algebra govern how AND gates operate
...
3 THE OR GATE
The OR gate is called the “any or all” gate
...
5
...
The lamp (Y) will glow when either switch A or switch B is closed
...
The lamp (Y) will no2
glow when both switches (A and B) are open
...
5
...
The truth table details the OR function of the switch and lamp
circuit
...
5
...
5
...
Note the different shape of the OR
gate
...
The output is labeled Y
...
Note that the plus ( + ) symbol means
OR in Boolean algebra
...
You will note that the plus sign does not mean to add as it does in regular algebra
...
4
4
The truth table for the 2-input OR gate is drawn in Fig
...
4b
...
The resulting output (Y) is shown in the right column of the
table
...
As before, a 0 is defined as a LOW (ground) voltage
...
The laws of Boolean algebra govern how an OR gate will operate
...
4 THE NOT GATE
A NOT gate is also called an inverter
...
The
NOT gate has only one input and one output
...
5a illustrates the logic symbol for
the inverter, or NOT gate
...
5
...
Figure 5
...
The input is always changed to its opposite
...
If the input to the NOT gate is a 1, the circuit will
complement it to give a 0
...
The
terms negating, complementing, and inverting all mean the same thing
...
5
...
The expression A =Ā
reads as A equals the output not A
...
Figure
5
...
The Boolean expressions
are written above the lines between the inverters
...
The Ā is then inverted again to form A (not not A)
...
5
...
In the shaded section below the
inverters, a 0 bit is the input
...
The 1 bit is
complemented again back to a 0
...
An alternative logic symbol for the NOT gate or inverter is shown in Fig
...
5e
...
When the invert bubble appears on the input side of the NOT symbol (as
in Fig
...
5e), the designer is usually trying to suggest that this is an active LOW
input
...
The alternative NOT gate symbol is commonly used in manufacturer’s
logic diagrams
...
The
formal Boolean algebra laws for the NOT gate are as follows:
6
Universality of NAND & NOR Gates
It is possible to implement any logic expression using only NAND gates and no other
type of gate
...
In a similar manner, it can be shown that NOR gates can be arranged to implement any of
the Boolean operations
...
In the past, vacuum-tube
and relay circuits performed logic functions
...
These ICs contain the equivalent of miniature resistors, diodes,
and transistors
...
1: 14-pin DIP integrated circuit
A popular type of IC is illustrated in Fig
...
1
...
Note that immediately counterclockwise from the notch on the IC shown in Fig
...
1 is pin
number 1
...
Manufacturers of ICs provide pin diagrams similar to the one in Fig
...
2 for a 7408 IC
...
Figure 6
...
The
power connections to the IC are the GND (pin 7) and Vcc (pin 14) pins
...
The 7408 IC is part of a family of logic devices
...
6
...
6
...
TTL devices are
currently among the most popular logic devices
...
6
...
A wiring diagram for the
circuit is shown in Fig
...
3b
...
The positive
(V',) and negative (GND) power connections are made to pins 14 and 7
...
Note that, if a switch is in the up position, a logical
3 (+ 5 V) is applied to the input of the AND gate
...
If the output at pin 3 is HIG'H
(+5V), current will flow through the LED
...
The truth table in Fig
...
4 shows the results of operating the 2-input AND circuit
...
6
...
Fig
...
4 Truth table for a TTL-type AND gate
3
Manufacturers of integrated circuits also produce other logic functions
...
5 illustrates pin
diagrams for two basic TTL ICs
...
5a is the pin diagram for a quadruple 2-input OR
gate
...
It could be wired and tested
in a manner similar to the testing of the AND gate shown in Fig
...
3b
...
6
...
6
...
The 7404 IC contains six NOT gates, or
inverters
...
Note that each IC has
its power connections (VCC and GND)
...
Q/ what logic function is performed by the circuit illustrated in the following Figure?
4
Digital
Techniques
Lecture 7
1st Class
Digital Techniques
Boolean Algebra
Boolean algebra is a form of symbolic logic that shows how logic gates
operate
...
Rules of Boolean algebra:
The following propositions are correct in and basic to Boolean algebra:
A+1 = 1
A+Ā = 1
A+0 = A
A+A = A
A
...
Ā=0 A
...
1=A
=
A =A
A+AB=A A+ĀB=A
(A+B)
...
b )
...
( b
...
b=b
...
7-1b
...
The
minterm Boolean expression is developed from the output 1s in the truth table
...
The minterm
expression for this truth table is given in Fig
...
7
...
7-1 can also be described by using a maxterrn form of
Boolean expression
...
For each 0 in the output column, an ORed term is developed
...
The maxterm Boolean
expression for this truth table is given in Fig
...
The maxterm expression for the OR
truth table is shown as B + A = Y
...
For the truth table in Fig
...
Both the minterm and maxterm expressions accurately
describe the logic of the truth table in Fig
...
Consider the truth table in Fig
...
The minterm expression for this truth table
would be rather long
...
Each of these
3
Fig
...
The variables are inverted and ORed with
parentheses around them
...
The complete maxterm Boolean
expression is given in Fig
...
The maxterm expression is also called the product-ofsums form of a Boolean expression
...
) symbols
...
73
...
The maxterm
expression (C + B’ + A’)
...
7-3
...
7-3 Maxterm expression implemented with OR-AND circuit
4
Minimization of Combinational Circuits
When constructing digital circuits, in addition to obtaining a functionally correct
circuit, we like to optimize them in terms of circuit size, speed, and power consumption
...
Usually, by reducing the
circuit size, we will also improve on speed and power consumption
...
If the resulting function is simpler than the original,
then we want to implement the circuit based on the simpler function, since that will give
us a smaller circuit size
...
There is no formula that says which is the next theorem to
use
...
The Karnaugh
map method is an easy way for reducing an equation manually and is discussed in the
following section
...
This graphic method is based on Boolean theorems
...
Karnaugh maps are sometimes
referred to as K- maps
...
Consider the familiar truth table in Fig
...
Each 1 in
the Y column of the truth table produces two variables ANDed together
...
7-4b)
...
The second step in the mapping procedure is to plot 1s in the Karnaugh map in Fig
...
Each ANDed set of variables from the minterm expression is placed in
5
Fig
...
The map is just a very special output column of the
truth table
...
Figure 74d shows two loops drawn on the map
...
The fourth step is to eliminate variables
...
7-4d
...
When a variable
and its complement are within a loop, that variable is eliminated
...
7-4e )
...
7-4d
...
The A and
A’ tcrms are eliminated, leaving only the B variable (Fig
...
The fifth step is to OR the remaining variables
...
7-4e)
...
6
Fig
...
Write a minterm Boolean expression from the truth table
...
Plot a 1 on the map for each ANDed group of variables
...
)
3
...
(The loops
may overlap
...
Eliminate the variable(s) that appear(s) with its (their) complement(s) within a loop,
and save the variable(s) that is (are) left
...
Logically OR the groups that remain to form the simplified minterm expression
...
7-5a
...
Figure 7-5b illustrates the
unsimplified minterm expression for the truth table
...
Five 1s are plotted on the map in Fig
...
Each 1 corresponds to an ANDed
group of variables (such as A
...
C)
...
Loops are placed around groups of eight, four, or two 1s
...
7-5d
...
The larger loop contains four
1s
...
The shaded loop in Fig
...
The C variable can thus be eliminated, leaving the A’
...
The
large loop contains the A and A’ as well as the B and B’ terms
...
The fifth step is to OR the remaining terms
...
B
terms are ORed in Fig
...
The final simplified Boolean expression is then C + A’
...
T his is much easier to implement with ICs than the unsimplified version of Fig
...
The simplified expression will generate the truth table in Fig
...
KARNAUGH MAPS WITH FOUR VARIABLES
Consider the truth table with four variables in Fig
...
The first step in simplification
by using a Karnaugh map is to write the minterm Boolean expression
...
7-6b
...
The second step is to
plot 1s on the Karnaugh map
...
7-6c
...
The third
step is to loop adjacent groups of 1s
...
Larger loops provide more simplification
...
76c
...
The fourth step is to eliminate variables
...
7-6c eliminates the A , B , and C variables
...
The
small loop contains two 1s and
8
Fig
...
That leaves the A’B C term
...
Figure 7-6d shows the remaining groups ORed to form the
simplified minterm expression D + A’ B C = Y
...
7-6 are compared
...
The steps for
1
...
(Note the inverted form in
Fig
...
)
2
...
The number of OS in the Y
column of the truth table will equal the number of 1s on the map
...
Draw loops around adjacent groups of two, four, or eight 1s on the map
...
Eliminate the variable(s) that appear(s) with its (their) complement(s) within a loop,
and save the variable(s) that is (are) left
...
Logically AND the groups that remain to form the simplified maxterm expression
...
7-7 Mapping with Maxterm expressions
...
Both techniques should be tried on a truth table to find the less
costly logic circuit
...
7-8
...
For
convenience, the table is completed in the shaded section, which shows other possible
combinations of the variables D, C, B, and A
...
These combinations are
called don’t cares when plotted on a Karnaugh map
...
Suppose a problem specifying that a warning light would come ON when the
BCD count reached 1001 (decimal 9); see the truth table in Fig
...
See 1 is placed in
the output column ( Y ) of the truth table after the input 1001
...
C’
...
A = Y
...
The “not used” combinations in the shaded section of the truth table might
have some effect on this problem
...
7-10b
...
C’
...
A term is plotted on the map
...
An X on the map means that square can be either a 1 or a 0
...
The X’s on the map can be considered 1s, so the
single loop is drawn around the 1 and three X’s
...
The loop contains four squares,
which will eliminate two variables
...
A = Y in Fig
...
As was said earlier, unused
combinations from a truth table are called don’t cares
...
Including don’t cares (X’s) in loops on a map helps to further simplify
Boolean expressions
...
7
...
7
...
1
Computer and System Eng
...
First class / 2009 - 2008
1
1
...
325)10
(0
...
152)10
(
)2
(
)2
)2
2
...
1010)2
(
)10
2
(0
...
011)2
(
)10
3
...
Convert the following decimal numbers to hexadecimal numbers:
(25)10
(
)16 (396)10
(
)16
(
(1342)10
)16
5
...
Convert the following Binary numbers to hexadecimal numbers:
(0110010110)
(
)16
(01101111010110) 2
(
)16
7
...
Convert the following octal numbers to decimal numbers:
(
)10 (14)8
(
(124)8
(371)8
(
)8
)10 (15
...
Convert the following octal numbers to binary numbers:
(61)8
(
)2
(53
...
25)
(
)2
10
...
110100)2
(
)8
(011
...
Sheet No
...
One switch is indicate if all the doors are closed or opens, each front
seat belt has a switch indicating if it is fastened and a pressure switch shows if the
front passenger seat is occupied
...
g
...
Design combinational logic circuit to implement the safety
system
...
Q3: It is required to design a combinational logic circuit that could be controlled to
work in two modes:
Mode1: Binary adder (add 3 bit number A to 3 bit number B)
Mode2: 2’s complement subtracter
...
Q4: Four chairs A, B, C, and D are placed in a row
...
A Boolean function F is (“1“) if and only if there are two or
more adjacent chairs that are empty
...
Express F as a minterm expansion (standard sum of products)
...
Simplify the minterm expansion of F
...
Switches A and B are on but switch C is off
...
Switches B and C are on but switch A is off
...
b) Minimize this expression and draw a logic diagram for it
...
a- Complete the truth table of circuit 1
...
Truth table for circuit 1
K
Inputs
L
M
N
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
a
b
Outputs
c d e
f
g
1
1
1
0
0
0
0
0
0
1
1
0
1
1
1
1
1
1
0
1
1
1
0
0
1
1
1
0
1
1
0
1
1
1
1
0
1
1
1
1
0
1
Displayed
character
A
C
E
F
H
P
U
y
Figure 1-a
Figure 1-b
Q2 A- Given the truth table below, write F as SOF and G
as POS
...
(4 marks)
Inputs
Outputs
A B C F
G
0
0
0
0
1
1
1
1
F=
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
1
0
0
0
1
1
0
0
1
1
0
1
1
1
0
0
B- Write the T
...
F(A,B,C,) = ∑ 0,2,4,6
G=
Q3-Complete the truth table for F where;
Inputs
A B
0 0
0 0
0 1
0 1
1 0
1 0
1 1
1 1
Q4-
F(A,B,C) = AC
Output
C
F
0
1
0
1
0
1
0
1
Given F(A,B,C,D) = ∑ 0,1,3,5,6,7,11,13:
i- Fill the Karnauph map below:
iii- Plot the logic circuit of F
...
Q5- It is required to design a combinational logic circuit that could be
controlled to work in two modes:
Mode 1: Binary adder
...
(subtracts a 3 bit number B from a 3 bit
number A using 1’s complement)
Q6- It is required to design a combinational logic circuit that could be
controlled to work in two modes:
Mode 1: Binary adder
...
(subtracts a 3 bit number B from a 3 bit
number A using 2’s complement
...
(1) Complete the truth table
...
(3) Obtain the simplified Boolean expression for D, E, and F using K-Map
Q8- Complete the following T
...
B) (C
...
Switches A and B are on but switch C is off
...
Switches B and C are on but switch A is off
Draw a truth table for this situation and obtain a Boolean expression for it
...
Title: Digital Techniques
Description: For Computer,Electrical Engineers 2nd Year
Description: For Computer,Electrical Engineers 2nd Year