Diapositiva 1

Download Report

Transcript Diapositiva 1

Combinatorial networks- I
Digital Systems M
1
Digital Systems
Some examples
• Computer
• Cameras
• Mobile phones
•Automobiles (injection, ABS..)
• ....
2
Digital systems
Physical systems using quantized values to represent, compute and
transfer informations
Signal: A physical value whose time behaviour represents the information to
transmit
Analog signal: a signal which can assume all values within its definition interval
Digital signal: a signal which can assume only some defined values within its
definition interval
3
Analog and digital signals
“noise”
• Analog signal
• Digital signal
H
• Binary signal. H and L values are
convenzionally indicated as 1 and 0
(bit – logic not numerical meaning!!!)
L
4
Switch
• Digital systems consist of switches
• ON/OFF devices
• Example
+ Vcc
Cause
Ii: {Imin,0}
Ii
Vu Effect
Vu: {0, Vcc}
An example: car petrol measurement
(ON/OFF) sensor
Binary variable (Bit)
4/4
3/4
2/4
Reserve ?
1 bit (0/1) – 2 levels
2
1/4
bit (00/01/10/11 – 4 levels
8/8
7/8
6/8
5/8
4/8
3/8
2/8
1/8
3 bit
(000/001/010/011/100/101/
110/111) - 8 levels
Conversions
A/D
D/A
Ex: valve position
Ex: steam pressure
Computer
Analog to Digital and Digital to Analog conversion
7
Information coding
Real picture
Sensor acquired image
Quantized numerical values
R  {0,1,2,..,254,255}
G  {0,1,2,..,254,255}
B  {0,1,2,..,254,255}
8
Numbers and codes
• A positional numerical system (i.e. that used in the computers) is a
set of symbols each representing a numerical quantity (i.e. 5, 7, 3
etc.) and whose actual value depends on its position
3547 = 3 x 103 + 5 x 102 + 4 x 101 + 7 x 100
N.B. There are NON positional numerical systems: i.e. the roman
numbers (XXIII => 2310)
• A code is a set of symbols whose combinations single out different
objects. For instance the Morse code (point and dash, the colours
and their positions of a flag), the bar code etc.
• A binary code is a code which uses only two symbols (i.e. a and b or
H(igh) and L(ow) or 0 and 1 etc.). A set of n of these symbols can
characterise 2n different objects (
i.e. with three bits – 0 and 1 - 8 objects)
000 001 010 011 100 101 110 111
• A ternary code uses three symbols (i.e. a and b and g ). With n of
these symbols 3n objects can be identified and so on …..
• Nothing to do with numbers !!!
• Using a binary code in order to code N objecs (where N is not a
power of 2) we need at least Z binary symbols where Z is the first
integer greater than log2(N) => |log2(N)|
9
Binary codes
• Very often (almost always) the two symbols used for a binary code are 0
and 1, in this case absolutely without any numerical meaning (they are
equivalent to low/high, red/green, open/close, a/b etc.). In this context in
a supermarket 100101 string could refer to the bread and 110101 string to
the milk. 0 and 1 symbols are called bit (that is binary digit)
• There are redundant codes (for instance the code 1 out of N where each
configuration has only one bit equal to 1). In this case with N bit N
objects are identified (ex: 010000, 000010 etc.)
• There is also a positional binary numerical system where the same
symbols 0 and 1 have a numerical meaning. In this context for instance
100101 indicates
1001012 = 1 x 25 + 0 x 24 + 0 x 23 + 1 x 22 + 0 x 21 + 1 x 20 = 32 + 4 + 1 = 3710
• Within the binary numerical system it is possible to execute all
arithmetical operations
10
Binary numbers
• The power of 2: 1,2,4,8,16,32,64,128,256,512,1024, 2048,4096,8192, 16384,
32768, 65536 must be known by heart !!!!
• In case of binary numerical values
(somehow confusing…)
0 e 1 too the word bit is used
• With n bit we can represent 2n numbers that is we cover the range
0….2n-1
(never forget the zero …). With 16 bit the range is 0 to 6553510 (= 6553610-1)
• Alfanumerical codes: i.e. ASCII code 7 bit (see later)
11
Elementary operations with binary numbers
1 1 1 1 0 1 0
1 1 0 1 0 1 1 +
0 1 1 1 0 1 0 =
---------------1 0 1 0 0 1 0 1
0 2 2 0 0 0
1 1 0 1 0 1 1 0 1 1 1 0 1 0 =
---------------0 1 1 0 0 0 1
0 1
Carry
1 0 7 +
5 8 =
----1 6 5
0 10 10
1 0 7 5 8 =
-------4 9
Borrow
12
Elementary operations with binary numbers
101101 x 1011
------------101101
101101=
000000==
101101===
------------111101111
111110
101
0101
101
00010
45 x 11
------45
45=
------495
101
1100
62:5= 12 with remnant 2
13
Negative binary numbers
•
Many different coding systems: 2’ complement is almost always used
•
Given a binary positive number its 2’s complement (negative equivalent)
can be obtained by substituting the 1s with 0s and viceversa (bit
complement operation) and summing then 1. Same procedure for
converting 2’s complement negative numbers into positive numbers
•
The 2’s complement negative numbers have a “1” as most significant bit
in a relative numbers context and those positive (including the zero
which is a “particolar” number – is a «not» number) have a “0” as most
significant bit .
•
The elementary operations with 2’s complement numbers produce 2’s
complement numbers (very simple for sums and subtractions, more
complex for moltiplications and divisions – Booth algorithm)
0100101 => 1011010 + 1 = 1011011
1011011 => 0100100 + 1 = 0100101
+37 => -37
-37 => +37
14
Negative binary numbers
1011011+
0010010=
------1101101 => 0010010 + 1= 0010011
-37+
18=
---19
1100+
1101=
---11001
-4+
-3=
--7
• In case of a carry beyond the MSB the carry must be discarded
implemented in the computers for physical reasons )
1011011 +
1010010 =
------10101101
Careful !!
ERROR – OVERFLOW
(automatically
-37 +
-46 =
---83
|-83| > 63!!
By summing two negative numbers we have obtained a positive
number !!! “Overflow” error in the computers
The 2’s complement provide correct results within the definition range (in our
case with 7 bit – 6 bit plus sign – the numbers from -6410 that is 1000000 up to
+6310 that is 0111111). In general with n bit the range is -2n-1 to +2n-1-1 (because of
the zero..).
15
Example 4 bit (3 bit + sign ) range from 1000 -> -8 to 0111 -> +7
Negative binary numbers
• With N bit numbers (that is N-1 data bit plus sign) the numbers range is 2N-1 --2N-1 -1.
Ex. With 8 bit (7 + 1 bit) -> 2N-1 = 27 = 12810 -> -2N-1 = -128 and 2N-1 -1 = 127
• The zero remains unchanged (0000 => 1111+1 => 0000 discarding the last bit)
• Non integer number arithmetic is extremely complex (floating point numers)
16
Base 5 arithmetic
Base 5
1 0 1
4 1 2 +
2 1 3 =
---------------1 1 3 0
Base 10
0 1
Carry
1 0 7 +
5 8 =
----1 6 5
11305 = 1 x 125 + 1 x 25 +3 x 5 + 0= 16510
Base 5
5 5
4 1 2 2 1 3 =
---------------1 4 4
Base 10
0 10 10
1 0 7 5 8 =
-------4 9
1445 = 1 x 25 + 4 x 5 + 4 = 4910
Borrow
Hexadecimal codes and numbers
• Very often the binary strings are too long for being represented. For instance:
00101001011110100101100101010
• This string is too long to be remembered. It is used therefore a Hexadecimal
notation by grouping by four the string
Binary
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
Hexadecimal (HEX)
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
18
Hexadecimal strings
The string:
00101001011110100101100101010
can be also rewritten as (grouping by four the bits )
0 0101 0010 1111 0100 1011 0010 1010
and therefore in hexadecimal notation the string is: 052F4B2A. If the
hexadecimal notation represents a number arithmetical operations are
possible
1000
carry (when 1610 is reached)
A57B +
B342 =
---------158BD
19
ASCII code
Here non western characters (arabs, polish, cyrillic etc.) are missing.
Unicode is a 16 bit code (65536 combinations) which allows to represent all alfanumeric symbols 20
Gray code
• Adjacent configurations differ by a single bit
011
Gray
010
000
001
011
010
110
111
101
100
110
Bin
000
001
010
011
100
101
110
111
Transient
000 o 011
White => 0 Black => 1
Very usefult for representing the position of an engine shaft
(conductor disk with brushes). There are no «discontinuities» . For
the conversion between the binary and Gray codes see later.
21
Parity
• There are codes which allow to identify in a transmission or in one datum a
single error: the most common is the parity (or disparity) bit which is added to
the code so that the total number of 1’s is always even (or odd). For instance
(even parity)
1001011 0000000 1111110
• Obviously a parity bit protects against single errors and not double or multiple
errorsTrasmitted
1001011 (even parity)
Received
1001111 Single error (green bit ) !!
1011001 Double error NOT detected!
• If it is accepted that a transmission is not too noisy (that is a single bit error is
the most likely) parity is a simple and very effective method.
22
Error correcting codes
A “distance” in a code is the number of bits which separate two allowed configurations. For instance in
a 5 bit code the two values 01011 e 01111 have a distance one while the two values, 01011 e 01101 have
distance two etc. Codes with distance 3 allow not only the detection but also the correction of single
errors
Correct values (distance 3 – 3 bit – only 2 correct values)
000
111
If 001 is received the only «near» correct configuration is 000 and therefore if we assume a single error
it can be corrected. The same applies for 101 (supposed transmitted code 111) but in case of double
error the correct configuration was 000. In this case therefore we can correct single errors and detect
double errors. Let see what happens with distance 4
?
If the only two allowed configurations are 0000 and 1111
we can detect single, double and triple errors. If 1110 is
received we can assume that the correct configuration is
1111 (correction) but if 0110 is received we can detect
the error but we are unable to correct it (same distance
from 0000 and 1111). CRC codes (Cyclic Redundant
Codes see later)
23
Code conversion
• The conversion of a binary numerical code into a decimal one is
straightforward (positional codes).
• The conversion from decimal to binary can be achieved through
successive divisions by 2 considering the remnants
Base 2
Remnant
75| 2 1
37| 2 1
18| 2 0
9| 2 1
10010112 => 7510
4| 2 0
2| 2 0
1| 2 1
Base 5
Remnant
165| 5 0
33| 5 3
11305 => 16510
6| 5 1
1| 0 1
24
Binary Coded Decimals
•
Decimal numbers code where each digit is made of its binary equivalent
• “Packed” notation : each digit (decimal number) consists of 4 bit
decimal 1
7 3
9
BCD 0001 0111 0011 1001
• In the “packed” notation two decimal digits are stored in a “byte” (8 bit )
• In a computer the same number would consist of two bytes
00010111 (17) ; 00111001 (39)
• “Unpacked”notation: one byte per each decimal digit. The previous number
(1739) would consist of 4 bytes
000000001 00000111 00000011 00001001
1
7
3
9
25
Binary codes and BCD conversions
To convert a binary code into BCD code it is sufficient to divide by 1010 that is 000010102
and (unpacked case) store the result in the MSB and the remainder in the LSB, For the
packed case the result must be stored in the MSnibble (4 bit) and the remainder in the
LSnibble . For instance
001101012 => 5310
00110101 : 1010 = 00000101 00000011 (unpacked 510 with remainder 310)
To convert BCD into binary, the reverse operation must be carried out. To convert an
unpacked BCD it is sufficient to multply the MSB by 1010 (that is 10102) and add the sum
with the LSB
00001001 00000010 (92 in BCD)
00001001 x 1010 = 01011010 (9010) which summed with 0000010 gives
01011100 that is (9210)
For BCD packed case the MSnibble must be multiplied by 10 and add the sum must be
with the LSnibble
26
7 segments matrix (example)
b
e
a
d g
i
z
With 7 bit => 27 = 128 combinations
(16 only are meaningful)
What is the relation between the number to be displayed and the luminous
segments ? (1 on – 0 off)
Number
Hex Bin (xyzw)
ab g d e z i
00
0
0000
1 1
01
1
0001
0 0
02
2
0010
1 0
03
3
0011
1 0
. . . . . . . . . . . . . . .
09
9
1001
1 1
10
A
1010
1 1
. . . . . . . . . . . . . . .
14
E
1110
1 1
15
F
1111
1 1
1
1
1
1
.
1
1
.
0
0
0
0
1
1
.
1
1
.
1
1
1
0
1
0
.
0
1
.
1
1
1
1
0
1
.
1
1
.
0
0
1
0
1
1
.
1
0
.
1
0
N.B. a,b,c,d,e,z,i are 7 functions of the binary bits xyzw . For instance how
can we determine the segment g = fg(x,y,z,w) ? How can we sinthesize fg ?
NB 6 (six) and b (b) are differently represented having 6 (six) the
segment «a» ON
29
How can we design a circuit (of any technology) able to
implement arithmetical operations on binary numbers
Keyboard
Conv
Arithmetical
Logical
Network
Electronic
Hydraulic
Mechanic
…………
Conv
Display
Design?
30
Combinatorial networks
• The previous 7 segments table is an example of a truth table which is the basic structure for
synthesizing the combinatorial networks that is networks whose outputs depend on the inputs
only and NOT on the time. These networks differ from the sequential networks whose outputs
depend on the time too that is on the past history of the network (which will be analysed later)..
• Given n binary input variables, the number of different functions which can be implemented is
•
2**2**n
• For instance with one input we can implement four combinatorial functions only
I f0 f1 f2 f3
0 01 0 1
1 01 1 0
Not considering the identity function (f2 – which electrically is a wire), and the constants (f0 and
f1) we have only one important function (f3) which is called negate, inversion or NOT and which is
represented by the following symbol:
In the expressions (see later) the inversion is normally indicated with a line over the variable
which is difficult to print so we use the exclamation point before the variable or an asterisc after
the variable. Example
f2 = !I
or
f2 = I*
31
Two variables functions
There are 16 different functions
I1 I0
f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14 f15
0
0
1
1
0
0
0
0
0
1
0
1
1
0
0
0
0
1
0
0
1
1
0
0
0
0
1
0
1
0
1
0
0
1
1
0
1
1
1
0
0
0
0
1
1
0
0
1
0
1
0
1
1
1
0
1
0
0
1
1
1
0
1
1
0
1
1
1
1
1
1
1
The combinatorial
functions are represented
by truth tables.
Important functions in red
Not considering the constants and the identities there are the
following characteristical two variable functions
f14 function OR
f8
f1
f7
f6
f9
function AND
function NOR
Symbol
Symbol
Symbol
function NAND Symbol
x
y
x
y
z
z
x
y
z
x
y
z
function EXOR Symbol
x
y
z
function EQUIV Symbol
x
y
z
(.)
N.B. these symbols correspond to
a physical implementation
where there is always a delay
between .the variations of the
inputs and the variation of the
output which depends on the
technology
()
The EXOR operator (exclusive or OR)
is also named as “module 2 adder ”
since its output binary value can be
interpreted as the sum of the inputs
interpreted as numerical binary values
(+)
32
Mechanical implementation
X
Voltage
OR
Z
y
X
y
Voltage
AND Z
NOT
Voltage
Switch closed => 1
Switch open => 0
Z
X
33
Combinatorial Algebra
• How can we transform a truth table into a logical network which uses the
elementary circuits previously described and viceversa ?
synthesys
Truth
table
Logical
scheme
Analisys
Combinatorial Algebra
• The combinatorial algebra is used to describe the functions of binary variables. It
is an algebra which can be used to represent the physical behaviour of the circuits
(but for the unavoidable physical delays). An algebra consists of symbols,
operations and postulates
Symbols:
Operations:
[0,1]
logical sum (+), logical product (.), complement (!)
Postulaties : 0+0=0
0.0=0
!0=1
0+1=1 1+0=1 1+1=1
0.1=0 1.0=0 1.1=1
!1=0
The point is the symbol
of the logical product
(always omitted)
NB: operations on SYMBOLS , NOT on numbers/bit !!!!
34
Combinatorial Algebra
• Constant: symbols 1 and 0
• Variables (binary): a literal which can assume the symbols 1 and 0 (very often
«values» is used)
• Function: f(x1, x2, …. xn) of n binary variables: a correspondence between a set of
literals (inputs) and a literal (output). It can be represented by a truth table
• Expression: a combination of literals and operations. i.e.: (((X+Y). !Z). !0) where X, Y
and Z are binary variables
• Evaluation: the computation of the binary value of an expression using the
operations and the postulates of the algebra and giving to the n-tuple of the inputs
all possible values. For instance for a n-tuple of 3 variables there are 8 possible
combinations. An example of function F is
XYZ
000
001
010
011
100
101
110
111
F
0
0
1
0
1
0
1
0
• Equivalent expressions: two expressions whose evaluations produce the same truth
table
• Properties: reflexive, simmetrical and transitive are valid
35
Combinatorial algebra and logical operators
Analisys
• The postulates of the combinatorial algebra correspond to the behaviour of
the AND,OR and NOT operators. An evaluation example
X
Y
F
F=(((X+Y). !Z). !0)
0
Z
XYZ
000
001
010
011
100
101
110
111
F
0
0
1
0
1
0
1
0
• It can be derived that an expression corresponds to a logical scheme and
viceversa
XYZ F
• Let’s evaluate this scheme
000 0
X
Y
Z
F
F=((X+Y). !Z)
The same truth table: equivalent !!
Less complex circuit
001
010
011
100
101
110
111
0
1
0
1
0
1
0
36
Some properties of the combinatorial algebra
(verified through the evaluation)
X+Y=Y+X
X.Y=Y.X
X+Y+Z=(X+Y)+Z
X.Y.Z=(X.Y).Z
X.(Y+Z)= (XY)+ (X.Z)
X+(Y+Z)=(X+Y)+(X+Z)
X+X=X
X.X=X (idempotence - both)
X+0=X
X.0=0
X+1=1
X.1=X
X+(X.Y)=X
X.(X+Y)=X
!(!X)=X
X+!X=1
X.!X=0
A.X+A.!X=A
(A+X).(A+!X)=A
!(X.Y) = !X+!Y
!(X+Y)=!X.!Y
(De Morgan laws – very important !!)
X.Y+Y.Z+ !X.Z= X.Y+!XZ
(X+Y).(Y+Z).(!X+Z)=(X+Y).(!X+Z)
X+!XY = X + Y (regularly forgotten ….)
NB: in the combinatorial algebra we use the same priority rules of the
mathematical algebra
Prior(!) > Prior(.) > Prior(+)
The parenthesis can be used to alter this order. The logical product point
is always omitted
37
Dual Expressions
• A dual expression is obtained by replacing 0 with 1 and the and
operator with or, and viceversa (the inversion remains unchanged)
F=(((X+Y). !Z). !0) => Fdual= (((X.Y)+!Z)+!1)
• Easily verified
(Fdual)dual=F
• If two expressions are equivalent are equivalent also the dual
expressions
if (((X+Y). !Z). !0) is equivalent to =((X+Y). !Z) (verify !!)
then
(((X.Y)+!Z)+!1) is equivalent to ((X.Y)+!Z)
(verify by means of the truth table)
38
Combinatorial algebra and logic operators
XYZ F
synthesys
000 0
001 1
010 1
011 0
100 1
101 0
110 1
111 1
• How can we derive a circuit from the truth table?
• Combinatorial circuits: circuits where the outputs
depend only from the inputs and NOT from the
time, that is its previous history
• From the truth table. The lines where the function
value is 1 must be selected and logical products
with all the variables (1 if true, 0 if complemented)
must be formed. All logical products (minterms)
must be logically summed
Canonical expression as sum-of-products (SP)
Two levels expression (the NOT is not considered).
X!Y!Z
XY!Z
XYZ
X!Y!Z
!X!YZ
F= !X!YZ + !XY!Z + X!Y!Z + XY!Z + XYZ
Each minterm is 1 for a single combination of the
inputs. Their logical sum «covers» all the 1’s of the
function
!X!YZ
!XY!Z
X
!XY!Z
Y
Z
F
XY!Z
XYZ
39
Combinatorial algebra and logic operators
synthesys
• As an alternative the lines where the function is 0 must be
selected and logical sums with all the variables (0 if true, 1 if
complemented) must be formed. All logical sums (maxterms)
must be logically anded.
F= (X+Y+Z)(X+!Y+!Z)(!X+Y+!Z)
Each maxterm is 0 for a single input combination. Each sum
«covers a «0» of the function
Canonical expression as product-of-sums (PS)
Two levels expression (the NOT is not considered).
XYZ
000
001
010
011
100
101
110
111
F
0 X+Y+Z
1
1
0 X +!Y +!Z
1
0 !X + Y +!Z
1
1
Important !!!!!! Any combinatorial logical network can be ALWAYS synthesized as
a two levels circuit (SP or PS)! A property very often forgotten !!!
X+Y+Z
X
X+!Y+!Z
Y
F (PS)
Z
!X+Y+!Z
The two canonical synthesys (SP and PS) lead in general to circuits of
40
different complexity
An example
XYZ
000
001
010
011
100
101
110
111
F
1
1
1
0
0
1
1
0
Fsp= !X!Y!Z + !X!YZ + !XY!Z + X!YZ + XY!Z
FPS= (X+!Y+!Z)(!X+Y+Z)(!X+!Y+!Z)
41
Espansion
• A SP (PS) expression (non canonical) can be «expanded» so as to become a
sum of minterms (product of maxterms) if we remember that X.1=X, X+!X=1,
X+X=X and X.X=X
Idempotence
a+b!c= a(b+!b)(c+!c) + (a+!a)b!c= abc+ab!c+a!bc+a!b!c+ab!c+!ab!c= abc+ab!c+a!bc+a!b!c+!ab!c
• Very often a combinatorial function is not completely specified, that is some
input combinations never occur (don’t cares). i.e.: mechanical constraints of
two keys
This is important for the synthesys. The analisys
(evaluation) of a circuit provides always (obviously) a
completely specified truth table.
F= !X!YZ + !XY!Z + X!Y!Z + XYZ= !X!YZ + !XY!Z + X!Y!Z + XYZ + !XYZ + XY!Z =
= !XZ(!Y+Y) + !XY(!Z+Z) + X!Z(!Y+Y) + X!Z(!Y+Y)=
= !XZ + !XY + XY + X!Z = !XZ + Y + X!Z
XYZ
000
001
010
011
100
101
110
111
F
0
1
1
?
1
0
?
1
(the don’t cares can be used (thanks for instance to the idempotence) to simplify the expression of a
function)
42
Exercise
Analyse this circuit, write the corresponding function and derive its SP canonical form
AB
0 !((AB)(B+C+D))
B+C+D
1
!(B+C+D)
0
!(D+E)
!(B+C+D)+!(D+E)
De Morgan
Z=!( !((AB)(B+C+D)) + (!(B+C+D)+!(D+E)) )= !( !(AB + ABC + ABD) + !((B+C+D)(D+E)))
De Morgan
Z= !( !(AB) +!( BD+BE+CD+CE+D+DE))= AB (D+CE+BE)
Absorption
Z= ABD + ABCE + ABE = ABD + ABE = ABD(C+!C)(E+!E) + ABE (C+!C)(D+!D)=
= ABCDE + AB!CDE + ABCD!E + AB!CD!E + ABCDE + AB!CDE + AB!CDE + AB!C!DE =
= ABCDE + AB!CDE + ABCD!E + AB!CDE + AB!C!DE
43
Transcoding:
Binary to Gray and viceversa
• Observing the gray code we have
g0 = !b2!b1b0 + !b2b1!b0 + b2!b1b0 + b2b1!b0 =
= ( !b2!b1b0 + b2!b1b0) + (!b2b1!b0 + b2b1!b0) =
= !b1b0 + b1!b0 = b0  b1
g1 = !b2b1!b0 + !b2b1b0 + b2!b1!b0 + b2!b1b0 =
= (!b2b1!b0 + !b2b1b0) + (b2!b1!b0 + b2!b1b0) =
= !b2b1 + b2!b1 = b2  b1
g2 = g2
gn = bn  bn+1 (N.B. bn+1 for the MSB is obviously 0. In fact g2 = b2 )
Bin
Gray
b2b1b0
g2g1g0
000
000
001
001
010
011
011 => 010
100
110
101
111
110
101
111
100
• Gray to binary. A truth table can be used (try as exercise) or we can use an algebric algorithm
gn = bn  bn+1
Let’s ex-or sum bn+1 to both members of the expression
bn+1  gn = (bn+1  bn+1)  bn = (0)  bn = bn and therefore
bn = bn+1  gn [with n bit bn+1 = 0]
In our case b2 = g2 , b1 = b2  g1 and b0 = b1  g0
Binary
DCBA
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
truth table
in red
where
Canonical synthesys of function fe of the 7 segments (0-F)
Integrated circuit 7446 which doesn’t implement the letters A->F
a
f
g
e
b
c
d
N.B. A segment is lighted if the circuit output
has low voltage.This synthesys is made as if
the output should be high (for analogy with the
previous synthesys). The obtained value must
be obvously then inverted
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F (HEX)
Red => on
Blu => off
fe=1
fe = !D!C!BA + !D!CBA + !DC!B!A + !DC!BA + !DCBA + D!C!BA + D!CBA + DC!B!A + DC!BA + DCBA
1
3
4
5
7
9
11
12
13
15
Selecting 0’
and inverting
(less complex)
(SP)
11 gates
(10x4 inputs AND
1x10 inputs OR)
fe = !( !D!C!B!A +!D!CB!A + !DCB!A + D!C!B!A + D!CB!A + DCB!A )
0
2
6
8
10
14
fe = (D+C+B+A) (D+C+!B+A) (D+!C+!B+A) (!D+C+B+A) (!D+!C+!B+A) (!D+!C+!B+A) (PS)
0
2
6
8
10
14
46
7 gates
(6x4 inputs OR
1x6 inputs AND)
FPGA Design using
Xilinx
Bring for the next lecture your laptop with installed Xilinx
Install the Xilinx development system (freeware – the file on the site is valid
for both Windows – any - and Linux OS) with the «webpack» option
47