digital logic - bfh · digital logic exercise book bfh-ti-biel/bienne (version v1.0) prof. dr. theo...
TRANSCRIPT
Digital LogicExercise Book
BFH-TI-Biel/Bienne
(Version v1.0)
Prof. Dr. Theo Kluter
Andreas Habegger
Adrien Corne
December 30, 2014
Contents
1 Combinational logic questions 1
2 Sequential logic questions 11
3 Numbers and representations 14
4 Finite State Machine (FSM) questions 20
1 Combinational logic questions
1. EN: Given the truthtable of the logic function Y below:
FR: Etant donnee la table de verite du fonction logique Y ci-dessous:
DE: Gegeben sei die Wahrheitstabelle der logischen Funktion Y:
A B C Y
0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 1
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
Questions:
(a) EN: Determine the smalest realisation of this function using the max-
terms.
FR: Determinez la realisation minimal de ce fonction logique en util-
isant les maxterms.
DE: Bestimmen Sie die kleinste Realisierung dieser Funktion unter
benutzung der maxterms.
(b) EN: Draw the minimal gate implementation of the result of the above
function.
FR: Dressez la realisation des portes pour la realisation minimal de
ce fonction logique.
DE: Zeichnen Sie die Gatterschaltung fur die obige minimal Real-
isierung.
1
2. EN: Given the karnaugh diagram below.
FR: Etant donnee le diagram de karnaugh ci-dessous.
DE: Gegeben Sei unten stehendes Karnaughdiagram.
1 0 0 − − 0 1 1
− 1 − 0 0 1 − −
0 0 1 − 1 0 0 0
0 0 0 1 − 0 0 0
A
B
DEE
Q
C
Question:
EN: Determine the smalest realisation of this function using the minterms.
FR: Determinez la realisation minimal de ce fonction logique en utilisant
les minterms.
DE: Bestimmen Sie die kleinste Realisierung dieser Funktion unter be-
nutzung der minterms.
2
3. EN: Given the circuit below:
FR: Etant donnee la realisation des portes ci-dessous:
DE: Gegeben sei unten stehende Gatterschaltung:
Y
C
B
A
Question:
(a) EN: Give the mathematical expression for the function Y.
FR: Donnez l’expression mathematique de la fonction Y.
DE: Geben Sie den mathematischen Ausdruck fur die Funktion Y.
(b) EN: Write down the truthtable for the function Y.
FR: Trassez la table de veritee de la fonction Y.
DE: Stellen Sie die Wahrheitstabelle der Funktion Y auf.
(c) EN: Is the above gate implementation the minimal realisation of the
function Y?
FR: Est la realisation des portes ci-dessus la realisation minimale de
la fonction Y?
DE: Ist die obig dargestellte Gatterschaltung die minimale Realisierung
der Funktion Y?
3
4. EN: Given the 7-segment display below. Each segment represents a logic
function (a,b,c,....). The logic function is true when the segment lights up.
FR: Etant donne l’afficheur 7 segments ci-dessous. Chaque segment repre-
sente une fonction logique (a,b,c,....). La fonction logique est vraie quand
le segment s’allume.
DE: Gegeben sei die nachstehend gezeichnete 7-SegmentAnzeige. Jedes
Segment ist eine logische Funktion (a,b,c,.....). Die Funktion ist wahr wenn
das Segment aufleuchtet.
a
b
c
d
e
f
g
EN: Given also the black-box below. This black-box has four inputs and
the seven logic functions as output.
FR: Etant donne la boıte noire ci-dessous. Cette boıte noire a quatre
entrees et a les sept fonctions logiques comme sorties.
DE: Gegeben sei auch ein schwarzer Kasten. Dieser Kasten hat vier Eingange
und die sieben logische Funktionen als Ausgange.
a
b
c
d
e
f
gZ
Y
X
W
?
EN: The function of this black-box is shown below:
FR: La fonction de cette boıte noire est donnee ci-dessous:
DE: Die Funktionalitat des schwarzen Kastens ist nachstehend gezeigt:
4
W X Y Z W X Y Z
0 0 0 0 1 0 0 0
0 0 0 1 1 0 0 1
0 0 1 0 1 0 1 0 don’t care
0 0 1 1 1 0 1 1 don’t care
0 1 0 0 1 1 0 0 don’t care
0 1 0 1 1 1 0 1 don’t care
0 1 1 0 1 1 1 0 don’t care
0 1 1 1 1 1 1 1 don’t care
Questions:
(a) EN: Give the truthtable for this blackbox.
FR: Dressez la table de verite pour cette boıte noire.
DE: Stellen Sie die Wahrheitstabelle fur diesen schwarzen Kasten
auf.
(b) EN: Find the smalest realisation of these logic functions using the
Karnaugh diagrams.
FR: Simplifiez les fonctions logique utilisant la methode de dia-
grammes de Karnaugh.
DE: Finden Sie die kleinste Realisierung dieser logischen Funktio-
nen unter benutzung des Karnaughdiagrams.
(c) EN: Give the gate-implementation for function a using only OR and
XOR gates.
FR: Dessinez la realisation des portes pour la fonction a en utilisant
seulement les portes OR et XOR.
DE: Entwickeln Sie die Gatterschaltung der Funktion a unter be-
nutzung von nur OR und XOR Gatter.
5
5. EN: Given the circuit below:
FR: Etant donnee la realisation des portes ci-dessous:
DE: Gegeben sei unten stehendes Schaltschema:
&
&
r1
1A
B
C
Y
Questions:
(a) EN: Define the logic function.
FR: Definir la fonction logique.
DE: Bestimmen sie die Logikfunktion.
(b) EN: What switching function is shown here?
FR: Ce qui est indiqu ici pour une fonction de commutation?
DE: Was fur eine Schaltfunktion wird hier dargestellt?
6
6. EN: Given the circuit below:
FR: Etant donnee la realisation des portes ci-dessous:
DE: Gegeben sei unten stehendes Schaltschema:
&&
&&
&
&
&
r1r1
1
1
A B C
Y
Questions:
(a) EN: Determine the logic function of the circuit.
FR: Determiner la fonction de commutation du circuit.
DE: Bestimmen sie die Schaltfunktion der Schaltung.
(b) EN: Minimize the circuit function by using axioms and sets of Boolean
algebra.
FR: Reduire au minimum le circuit en utilisation des axiomes d’algebre
de Boole et exploitation d’ensembles.
DE: Minimieren sie die Schaltung under Verwendung der Satze und
Axiome der Booleschen Algebra.
7
7. EN: Given the function below:
FR: Etant donnee l’ equation ci-dessous:
DE: Gegeben sei nachstehende Gleichung:
Y = A · B ·A ·B · C +B · C +A ·B · C
Questions:
(a) EN: Reduce as far as possible the circuit expression by using Boolean
algebra, the axioms and sets.
FR: Reduire autant que possible a l’aide d’algbere de Boole, en util-
isant les axiomes et definit le circuit.
DE: Reduzieren sie die Schaltung soweit wie moglich mittels Boo-
lescher Algebra unter verwendung der Axiome und Satze.
8. EN: Given the function V below, draw the gate implementation only using
two input OR and XOR gates:
FR: Etant donne la function V ci-dessous, dessinez la realisation des portes
en utilisant seulement les portes OR et XOR avec deux entrees:
DE: Gegeben Sei nachstehende Funktion V. Zeichnen Sie die Gatterimple-
mentierung dieser Funktion unter benutzung von nur OR und XOR Gatter
mit zwei Eingange:
V = F · V + F · (X ⊕ Z)
8
9. EN: Given the truthtable below:
FR: Etant donne la table de veritee ci-dessous:
DE: Gegeben sei unten stehende Wahrheitstabelle:
E D C B A Y
0 0 0 0 0 0
0 0 0 0 1 1
0 0 0 1 0 0
0 0 0 1 1 1
0 0 1 0 0 0
0 0 1 0 1 0
0 0 1 1 0 1
0 0 1 1 1 1
0 1 0 0 0 -
0 1 0 0 1 0
0 1 0 1 0 -
0 1 0 1 1 0
0 1 1 0 0 -
0 1 1 0 1 0
0 1 1 1 0 -
0 1 1 1 1 0
bla
E D C B A Y
1 0 0 0 0 1
1 0 0 0 1 0
1 0 0 1 0 1
1 0 0 1 1 0
1 0 1 0 0 1
1 0 1 0 1 1
1 0 1 1 0 1
1 0 1 1 1 0
1 1 0 0 0 -
1 1 0 0 1 0
1 1 0 1 0 -
1 1 0 1 1 1
1 1 1 0 0 -
1 1 1 0 1 0
1 1 1 1 0 -
1 1 1 1 1 1
(a) EN: Fill in the Karnaugh diagram below:
FR: Remplisez le diagram de Karnaugh ci-dessous:
DE: Fullen Sie das Karnaugh Diagram aus:
A
B
C
DEE
Y
9
(b) EN: Simplify the logic function Y using the maxterms:
FR: Simplifiez le fonction Y en utilisant les maxterms:
DE: Vereinfachen Sie die Funktion Y unter benutzung der maxterms:
(c) EN: The inputs E,C and the output Y are active-low. Draw the IEC
gate implementation of the logic function Y.
FR: Les entrees E,C et la sortie Y sont actif au niveau bas. Dessinez
le comportement des portes (IEC) qui met on oevre la fonction Y.
DE: Die Eingange E,C und der Ausgang Y sind low-aktiv. Zeichnen
Sie die IEC Gatterschaltung zur Funktion Y.
10. EN: Show with boolean algebra that:
FR: Montrez avec l’algebre boolean que:
DE: Zeigen Sie unter benutzung der Boolean Algebra dass:
C ⊕ D = C ⊕ D = C ⊕ D
10
2 Sequential logic questions
1. EN: Given the karnaugh diagram below.
FR: Etant donnee le diagram de karnaugh ci-dessous.
DE: Gegeben Sei unten stehendes Karnaughdiagram.
A
Q
C
B
D
Q Q
1 0 1 1 1 0 0 0
− 1 0 1 0 0 0 0
1 − 1 0 0 1 1 0
0 0 − − − 0 0 1
Question:
(a) EN: Determine the smalest realisation of this function using the minterms.
FR: Determinez la realisation minimal de ce fonction logique en util-
isant les minterms.
DE: Bestimmen Sie die kleinste Realisierung dieser Funktion unter
benutzung der minterms.
(b) EN: Is the funktion Q a sequential logic function or a combinational
logic function?
FR: La fonctions Q ci-dessus est-elle sequentielle ou combinatoires?
DE: Ist die Funktion Q eine sequentielle oder kombinatorische logis-
che Funktion?
11
2. Optimization:
(a) EN: Simplify the functions Q and C given by the karnaugh diagrams
below, using for Q the minterms and C the maxterms:
FR: Simplifiez les fonctions Q et C, qui sont donnees par les dia-
grammes de karnaugh ci-dessous en utilisant les minterms pour la
function Q et les maxterms pour la function C:
DE: Geben Sie die minimaler Realisation der Funktionen Q und C
gegeben durch unten stehende Karnaugh-Diagramme. Benutzen Sie
fur Q die minterme und fur C die maxterme:
Q
C
A
B
E
S
? Q
B
A
S E
E
0 0 0 0
11111 1 1
000
Q
010 0
01101
1
11
00
11
00
Q
B
A
S E
E
0 0 1 0
01000 1 0
010
C
0110
11 0
0
00 1 1
11
1111
Q =C =
(b) EN: Are the above functions Q and C sequential or combinational?
FR: Les fonctions Q et C ci-dessus sont-elles sequentielle ou combi-
natoires?
DE: Sind die Funktionen Q und C sequentielle und/oder kombina-
torische logische Funktionen?
12
3. Logic functions:
EN: Given the circuit below:
FR: Etant donne le circuit ci-dessous :
DE: Gegeben Sei unsterstehende Gatterschaltung:
A
B
C
X
Y
(a) EN: Write down the truthtable of the function X.
FR: Ecrivez la table de verite de la fonction X.
DE: Geben Sie die Wahrheitstabelle der Funktion X.
(b) EN: Are the functions X and Y sequential or combinational functions
(why)?
FR: Sont les fonction X et Y des fonctions sequentieles ou des fonc-
tions combinatoires (pourquoi)?
DE: Sind die Funktion X und Y sequentielle oder kombinatorische
Funktionen (warum)?
(c) EN: Fill out the timing diagram below:
FR: Remplissez le chronogram ci-dessous:
DE: Fullen Sie das unten stehende Zeitdiagram aus:
A
B
C
X
Y
t
13
3 Numbers and representations
1. EN: Given below U and V two distincts ordered sets of 8 bits, give for
each sets the decimal value consistent with the interpretation. Justify the
calculations:
FR: Etant donnes U et V deux ensembles de 8 bits distincts, donnez la
valeur decimale selon la representation demandee. Justifiez le calcul.
DE: Gegeben seien die zwei sets von 8 bits U und V wie unten dargestellt.
geben Sie die dazugehorender Dezimalwert unter benutzung der angegebene
Interpretationen.
U = 0x7D V = 100110.01b
(a) Binary:
(b) Sign and Magnitude:
(c) One-complement:
(d) Two-complement:
14
(e) Excess-64:
2. EN: Given two binary 8-bit numbers A, B below.
FR: Soit deux nombres binaires 8 bits A, B.
DE: Gegeben seien zwei 8-bit Zahlen A und B.
A = 01001101b B = 10010111b
(a) EN: Compute A + B and give the result in both binary and decimal
bases.
FR: Calculez A + B et donnez le resultat en binaire puis en decimal.
DE: Berechnen Sie A + B und geben Sie das Resultat sowohl im
binaren System als auch im dezimalen System.
(b) EN: Compute B - A and give the result in a two-complement repre-
sentation.
FR: Calculez B - A et donnez le resultat enrepresentation en 2-com-
plement.
DE: Berechnen Sie B - A und geben Sie das Resultat im zweierkom-
plement System.
15
3. EN: Given a system of base B = 5.
FR: Etant donne un systeme de base B = 5.
DE: Gegeben sei ein System der Base B = 5.
(a) EN: Which numbers are represented by a digit?
FR: Quels chiffres sont representes par un digit ?
DE: Welche Zahlen konen durch ein digit dargestellt werden?
(b) EN: Given the decimal number W below, give the representation of
W in the system of base B = 5.
FR: Soit le nombre decimal W, quelle est la representation de W
dans la base B = 5.
DE: Gegeben sei der Zahl W. Wie wird W dargestellt in ein System
der Base B=5?
W = 191dec
(c) EN: Given two numbers in base 5 U, V below, perform the divisionUV
in the system of base B = 5.
FR: Soit les deux nombres en base 5 U, V, calculez la division UV
dans la base B = 5.
DE: Gegeben seien die Zahlen U und V in ein System in der Base 5.
Berechnen Sie die Division UV
in das System der Base B = 5.
U = 3411B=5 V = 122B=5
16
4. EN: Given the below ordered set of bits. What is the decimal value given
the interpretation:
FR: Etant donne l’ensemble de bits ci-dessous, ecrivez le nombre decimal
en utilisant la representation suivante:
DE: Gegeben sei die unterstehender Set von geordneten bits. Welcher
Dezimal-Wert wird wiedergegeben wenn wir folgende Interpretation be-
nutzen:
U = 101101.10b
(a) Binary:
U=
(b) Sign-and-magnitude:
U=
(c) One’s-complement:
U=
(d) Two’s-complement:
U=
(e) Excess-128:
U=
17
5. Numbers:
(a) EN: Given a system of base B = 9, which numbers are represented
by a digit?
FR: Etant donne un systeme de base B = 9, quels nombres peuvent
etre representes par un chiffre ?
DE: Gegeben sei ein System der Base B = 9, welche Zahlen konnen
mit einem digit reprasentiert werden?
dj ∈ [ ]
(b) EN: Given the decimal number W below. Give the representation of
W in a system of base B = 9:
FR: Etant donne le nombre decimaux W ci-dessous. Donnez la
representation de W dans un systeme de base B = 9 :
DE: Gegeben sei der unterstehenden Dezimal-Wert W. Geben Sie
die Darstellung von W in einem System der Base B = 9 :
W = 303dec
W = B=9
(c) EN: Given the decimal numbers A and B below. Give the fixed point
representation in 8-bits with four digits behind the binary point:
FR: Etant donne les nombres A et B en decimal ci-dessous. Donnez
la representation en virgule fixe de 8-bits avec 4 chiffres a droite de
la virgule:
DE: Gegeben seien die Dezimalzahlen A und B. Geben Sie die leitkom-
ma Representierung dieser Zahlen in 8-bits mit 4-bits hinter dem
Komma.
A = 6dec B = 10dec
A = . b B = . b
18
(d) EN: Perform the binary division AB
of the above numbers:
FR: Executez la division binaire AB
des nombres ci-dessus:
DE: Fuhren Sie die Division AB
durch.
AB= . b
(e) EN: What is the error we make in the representation of 6
10in the
given 8-bit fixed point notation?
FR: Quelle est l’erreur que nous faisons dans la representation de 6
10
dans la notation de point fixe donnee?
DE: Welcher Fehler machen wir in die Representation von 6
10in der
gegebene leitkomma Representation?
19
4 Finite State Machine (FSM) questions
1. EN: Given the Moore State Machine below with its corresponding state
diagram:
FR: Etant donne la machine d’etat du type Moore, avec son diagramme
d’etat:
DE: Gegeben sei das Blockschaltbild und das Zustandsdiagram eines Moore
Automaten:
101 b
111 b
110 b100 b
D Q
D Q
D QU 0
U 1
U 2
S 0
S 1
S 2
000 b
S
S
Z
ZZ
Z
CALC
ERROR
IDLE
INITLATCH
S
Z
ERROR
DONE
Clock
(a) EN: How many states are missing in the state diagram?
FR: Combien d’etats sont absents dans le diagramme d’etat?
DE: Wieviele Zustande fehlen in dieses Zustandsdiagramm?
20
(b) EN: Draw the missing states such that they lead to the state ERROR.
FR: Dessinez les etats absents tels qu’ils menent a l’etat ERROR.
DE: Zeichnen Sie die fehlende Zustande so ein das Sie immer zum
Zustand ERROR fuhren.
101 b
111 b
110 b100 b 000 b
S
S
Z
ZZ
Z
CALC
ERROR
IDLE
INITLATCH
(c) EN: Write down the truthtable for the update logic using don’t cares:
FR: Ecrivez la table de transition en utilisant des don’t cares:
DE: Stellen Sie die Ubergangstabelle auf unter Benutzung der don’t
cares:S Z S2 S1 S0 U2 U1 U0
21
(d) EN: We added the synchronous reset signal R. Is the new state-
diagram complete and consistent, if not make it complete and con-
sistent.
FR: Nous avons ajoute le signal R de reset synchronous. Le nouveau
diagramme d’etat est-il integral et consistant? Si non modifiez-le afin
qu’il le devienne.
DE: Wir haben am Zustandsdiagram ein synchroner Reset zugefugt.
Ist dieses neue Zustandsdiagram Komplet und Konsistent? Wenn
nich machen Sie es Komplet und Konsistent.
101 b
111 b
110 b100 b 000 b
S
S
Z
ZZ
Z
CALC
ERROR
IDLE
INITLATCH
RR
R
22