Combinatorial networks- I Digital Systems M 1 Digital Systems - - PowerPoint PPT Presentation

combinatorial networks i
SMART_READER_LITE
LIVE PREVIEW

Combinatorial networks- I Digital Systems M 1 Digital Systems - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

Combinatorial networks- I

1

Digital Systems M

slide-2
SLIDE 2

Digital Systems

Some examples

  • Computer
  • Cameras
  • Mobile phones
  • Automobiles (injection, ABS..)
  • ....

2

slide-3
SLIDE 3

Physical systems using quantized values to represent, compute and transfer informations

Digital systems

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

slide-4
SLIDE 4

Analog and digital signals

  • Analog signal
  • Digital signal (quantized)
  • Binary signal. H and L values are

convenzionally indicated as 1 and 0 (bit – logic not numerical meaning!!!)

L H

“noise”

4

slide-5
SLIDE 5

+ Vcc Vu Ii Ii: {Imin,0} Vu: {0, Vcc} Cause Effect

Switch

  • Digital systems consist of switches
  • ON/OFF devices
  • Example
slide-6
SLIDE 6

An example: car petrol measurement

1/4 2/4 3/4 4/4 1/8 2/8 3/8 4/8 5/8 6/8 7/8 8/8

2 bit (00/01/10/11 – 4 levels 3 bit (000/001/010/011/100/101/ 110/111) - 8 levels

Reserve ? (ON/OFF) sensor

1 bit (0/1) – 2 levels

Binary variable (Bit)

slide-7
SLIDE 7

Conversions

A/D D/A

Computer Analog to Digital and Digital to Analog conversion Ex: steam pressure Ex: valve position

7

slide-8
SLIDE 8

Information coding

Real picture Sensor acquired image R ∈ {0,1,2,..,254,255} G ∈ {0,1,2,..,254,255} B ∈ {0,1,2,..,254,255}

Quantized numerical values

8

slide-9
SLIDE 9

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)

9

  • A code is a set of

symbols whose combinations single out different

  • bjects. 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. α and β 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. α and β and γ ). 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 objects (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)|

slide-10
SLIDE 10

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, α/β 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)

10

  • 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
  • perations
slide-11
SLIDE 11

Binary numbers

11

  • 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 0 e 1 too the word bit is used

(somehow confusing…)

  • 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)
slide-12
SLIDE 12

Elementary operations with binary numbers

12

1 1 1 1 0 1 0 0 1 Carry-over 1 1 0 1 0 1 1 + 1 0 7 + 0 1 1 1 0 1 0 = 5 8 =

  • 1 0 1 0 0 1 0 1 1 6 5

0 2 2 0 0 0 0 10 10 Borrow 1 1 0 1 0 1 1 - 1 0 7 - 0 1 1 1 0 1 0 = 5 8 =

  • 0 1 1 0 0 0 1 4 9
slide-13
SLIDE 13

13

101101 x 1011 45 x 11

  • 101101 45

101101= 45= 000000== ------- 101101=== 495

  • 111101111

111110 101 62:5= 12 with remnant 2 101 1100 0101 101 00010

Elementary operations with binary numbers

slide-14
SLIDE 14

14

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 adding 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 +37 => -37 1011011 => 0100100 + 1 = 0100101

  • 37 => +37
slide-15
SLIDE 15

Negative binary numbers

15

  • In case of a carry beyond the MSB the carry must be discarded

(automatically implemented in the computers for physical reasons )

1011011+ -37+ 1100+ -4+ 0010010= 18= 1101= -3=

  • 1101101 => 0010010 + 1= 0010011 -19 11001 -7

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..). Example 4 bit (3 bit + sign ) range from 1000 -> -8 to 0111 -> +7

1011011 + -37 + 1010010 = -46 =

  • 10101101 ERROR – OVERFLOW -83

|-83| > 63!! By summing two negative numbers we have obtained a positive number !!! “Overflow” error in the computers Careful !!

slide-16
SLIDE 16

16

  • The zero remains unchanged (0000 => 1111+1 => 0000 discarding the last bit)
  • 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

Negative binary numbers

  • Non integer number arithmetic is extremely complex (floating point numers)
slide-17
SLIDE 17

Base 5 arithmetic

1 0 1 0 1 Carry-over 4 1 2 + 1 0 7 + 2 1 3 = 5 8 =

  • 1 1 3 0 1 6 5

5 5 0 10 10 Borrow 4 1 2 - 1 0 7 - 2 1 3 = 5 8 =

  • 1 4 4 4 9

11305 = 1 x 125 + 1 x 25 +3 x 5 + 0= 16510 Base 10 Base 5 Base 10 Base 5 1445 = 1 x 25 + 4 x 5 + 4 = 4910

slide-18
SLIDE 18

Hexadecimal codes and numbers

18

  • 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 Hexadecimal (HEX)

0000 0001 1 0010 2 0011 3 0100 4 0101 5 0110 6 0111 7 1000 8 1001 9 1010 A 1011 B 1100 C 1101 D 1110 E 1111 F

slide-19
SLIDE 19

Hexadecimal strings

19

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
slide-20
SLIDE 20

20

ASCII code

Here non western characters (arabs, polish, cyrillic, hindi etc.) are missing. Unicode is a 16 bit code (65536 combinations) which allows to represent all alfanumeric symbols

slide-21
SLIDE 21

21

Gray code

  • Adjacent configurations differ by a single bit

010 011 110

Very usefult for representing the position

  • f

an engine shaft (conductor disk with brushes). There are no «discontinuities» . For the conversion between the binary and Gray codes see later. White => 0 Black => 1

Bin

000 001 011 010 110 111 101 100

Gray

000 001 010 011 100 101 110 111 000 or 011 Transient

slide-22
SLIDE 22

22

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

errors- Trasmitted 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.

slide-23
SLIDE 23

23

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)

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 000 111 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)

?

slide-24
SLIDE 24

Code conversion

24

  • 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 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 2 Remnant 165| 5 0 33| 5 3 11305 => 16510 6| 5 1 1| 0 1 Base 5

slide-25
SLIDE 25

25

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

slide-26
SLIDE 26

7 segments matrix (example)

29

α β γ δ ε ζ ι With 7 bit => 27 = 128 combinations (16 only are meaningful) N.B. α,β,χ,δ,ε,ζ,ι are 7 functions of the binary bits xyzw . For instance how can we determine the segment γ = fγ(x,y,z,w) ? How can we sinthesize fγ ? NB 6 (six) and b (b) are differently represented having 6 (six) the segment «α» ON What is the relation between the number to be displayed and the luminous segments ? (1 on – 0 off) Number Hex Bin (xyzw) α β γ δ ε ζ ι

00 0 0000 1 1 1 0 1 1 1 01 1 0001 0 0 1 0 0 1 0 02 2 0010 1 0 1 1 1 0 1 03 3 0011 1 0 1 1 0 1 1 . . . . . . . . . . . . . . . . . . . . 09 9 1001 1 1 1 1 0 1 1 10 A 1010 1 1 1 1 1 1 0 . . . . . . . . . . . . . . . . . . . . 14 E 1110 1 1 0 1 1 0 1 15 F 1111 1 1 0 1 1 0 0

α γ δ ζ ι α β δ ε ι

slide-27
SLIDE 27

How can we design a circuit (of any technology) able to implement arithmetical operations on binary numbers

30

Conv

Keyboard

Conv Arithmetical Logical Network

Electronic Hydraulic Mechanic …………

Display Design?

slide-28
SLIDE 28

Combinatorial networks

31

  • 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

  • nly 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 1 0 1 1 0 1 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*

slide-29
SLIDE 29

Two variables functions

32

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 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Not considering the constants and the identities there are the following characteristical two variable functions f14 function OR Symbol (+) f8 function AND Symbol (.) f1 function NOR Symbol f7 function NAND Symbol f6 function EXOR Symbol (⊕) f9 function EQUIV Symbol .

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

  • utput 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

The combinatorial functions are represented by truth tables. Important functions in red x y z x y z x y z x y z x y z x y z

slide-30
SLIDE 30

Mechanical implementation

33

X y Z

Voltage OR

X y Z

Voltage AND

X Z

Voltage NOT Switch closed => 1 Switch open => 0

slide-31
SLIDE 31

Combinatorial Algebra

34

  • How can we transform a truth table into a logical network which uses the

elementary circuits previously described and viceversa ? Truth table Logical scheme synthesys Analisys Combinatorial Algebra

  • The combinatorial algebra is used to describe the functions of binary variables. It

is an algebra (BOOle 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: [0,1] Operations: logical sum (+), logical product (.), complement (!) Postulates : 0+0=0 0+1=1 1+0=1 1+1=1 0.0=0 0.1=0 1.0=0 1.1=1 !0=1 !1=0 NB: operations on SYMBOLS , NOT on numbers/bit !!!!

The point is the symbol

  • f the logical product

(always omitted)

slide-32
SLIDE 32

35

  • Constant: symbols 1 and 0

Combinatorial Algebra

  • Variables (binary): a literal which can assume the symbols 1 and 0 (very
  • ften «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
  • perations 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 F 000 0 001 0 010 1 011 0 100 1 101 0 110 1 111 0

  • Equivalent expressions: two expressions whose evaluations produce the

same truth table

  • Properties:

reflexive, simmetrical and transitive are valid

slide-33
SLIDE 33

Combinatorial algebra and logical operators Analisys

36

  • The postulates of the combinatorial algebra correspond to the behaviour of

the AND,OR and NOT operators. An evaluation example F=(((X+Y). !Z). !0)

X Y Z F XYZ F 000 0 001 0 010 1 011 0 100 1 101 0 110 1 111 0

  • Let’s evaluate this scheme

X Y Z F XYZ F 000 0 001 0 010 1 011 0 100 1 101 0 110 1 111 0

The same truth table: equivalent !! Less complex circuit

F=((X+Y). !Z)

  • It can be derived that an expression corresponds to a logical scheme

and viceversa

slide-34
SLIDE 34

Some properties of the combinatorial algebra (verified through the evaluation)

37

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

slide-35
SLIDE 35

Dual Expressions

38

  • A dual expression is obtained by replacing

0 with 1 and the and

  • perator 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 also the dual expressions are

equivalent 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)

slide-36
SLIDE 36

Combinatorial algebra and logic operators synthesys

39

XYZ F 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?

F X Z Y

!X!YZ !XY!Z X!Y!Z XY!Z XYZ

  • 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) called minterms must be formed. !X!YZ !XY!Z X!Y!Z XY!Z XYZ All minterms must be logically summed 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 Canonical expression as sum-of-products (SP) Two levels expression (the NOT is not considered).

slide-37
SLIDE 37

Combinatorial algebra and logic operators synthesys

XYZ F 000 0 X + Y + Z 001 1 010 1 011 0 X +!Y +!Z 100 1 101 0 !X + Y +!Z 110 1 111 1

  • 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).

40

Important !!!!!! Any combinatorial logical network can be ALWAYS synthesized as a two levels circuit (SP or PS)! A property very often forgotten !!! X Z F (PS) Y

X+Y+Z X+!Y+!Z !X+Y+!Z

The two canonical synthesys (SP and PS) lead in general to circuits of different complexity

slide-38
SLIDE 38

41

An example

XYZ F 000 1 001 1 010 1 011 0 100 0 101 1 110 1 111 0

Fsp= !X!Y!Z + !X!YZ + !XY!Z + X!YZ + XY!Z FPS= (X+!Y+!Z)(!X+Y+Z)(!X+!Y+!Z)

slide-39
SLIDE 39

Espansion

42

This is important for the synthesys. The analisys (evaluation) of a circuit provides always (obviously) a completely specified truth table.

  • 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

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

XYZ F 000 0 001 1 010 1 011 ? 100 1 101 0 110 ? 111 1 F= !X!YZ + !XY!Z + X!Y!Z + XYZ= !X!YZ + !XY!Z + X!Y!Z + XYZ + !XYZ + XY!Z =

Idempotence

  • 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

= !XZ(!Y+Y) + !XY(!Z+Z) + X!Z(!Y+Y) + X!Z(!Y+Y)= = !XZ + !XY + XY + X!Z = !XZ + Y + X!Z

(the don’t cares can be used - thanks for instance to the idempotence- to simplify the expression of a function)

slide-40
SLIDE 40

43

Exercise

Analyse this circuit, write the corresponding function and derive its SP canonical form AB B+C+D !(B+C+D) !(D+E) !((AB)(B+C+D)) !(B+C+D)+!(D+E) Z=!(!((AB)(B+C+D)) + (!(B+C+D)+!(D+E)) )= !(!(AB + ABC + ABD) + !((B+C+D)(D+E))) Z= !(!(AB) +!( BD+BE+CD+CE+D+DE)) 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 = De Morgan = AB (D+CE+BE) Absorption

1

= ABCDE + AB!CDE + ABCD!E + AB!CDE + AB!C!DE canonical

Can we derive the canonical expression?

De Morgan Absorption Absorption

slide-41
SLIDE 41

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

000 001 011 010 110 111 101 100

Gray

000 001 010 011 => 100 101 110 111

Bin

g2g1g0 b2b1b0

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 )

  • 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

slide-42
SLIDE 42

Canonical synthesys of function fe of the 7 segments (0-F)

46

Binary DCBA 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 truth table in red where

fe=1

0 1 2 3 4 5 6 7 8 9 A B C D E F (Hex values) f b g e c d a

fe = !D!C!BA + !D!CBA + !DC!B!A + !DC!BA + !DCBA + D!C!BA + D!CBA + DC!B!A + DC!BA + DCBA (SP) 1 3 4 5 7 9 11 12 13 15 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 Integrated circuit 7446 which doesn’t implement the letters A->F

Red => on Blu => off 11 gates (10x4 inputs AND 1x10 inputs OR)

7 gates (6x4 inputs OR 1x6 inputs AND)

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