Note 04 Gates Matrix PDF
Note 04 Gates Matrix PDF
Computer operation.
The basic operation of a computer is to move binary information among registers fast and in large
quantities. The control of the movement is done by gates plus a program language that the computer
understands. The binary bit is often referred to as logic “0” and logic “1”, or high and low in terms of
voltages. In TTL (transistor-transistor logics) logic“0” is 0~0.8V, and logic “1” is 2.0~5.0 V. There is no
confusion here, since there are only two distinct states with a relatively large voltage gap.
The gates perform a go no-go function implemented by some transistor/diode/resistor circuit. The
circuitry may be complicated. The gates in this discussion are commercially available.
Beyond the gates there are registers or counters, multiplexer and others. In general these devices have
terminals for inputs, outputs, and controls as well as power supply. In all logic diagrams, the power
supply is left out for clarity. For now let's not worry about the detail of the input/output characteristics
(impedance).
m
er as
OR and AND gates
co
eH w
At the inputs we connect a voltage source (hi or lo). At the output we connect a voltmeter to observe the
o.
output voltage (hi or lo). Symbolically A and B are the inputs and F is the output. The functional
rs e
ou urc
relationship is defined by the TRUTH table and is implemented by the built-in electronics.
Logic “1” is often labeled as TRUE, and logic “0” as FALSE.
o
A B F F=A+B A B F F=A B
aC s
0 0 0 0 0 0
vi y re
0 1 1 A 0 1 0 A
B F F
1 0 1 1 0 0 B
1 1 1 1 1 1
ed d
ar stu
These are hardware devices. The input A & B can be thought of as an event and the output F as the
outcome. The logic is pretty straight forward. The OR function is indicated by a + sign. The AND
is
INVERTER
A F F=A
0 1
sh
1 0 A F
An over score is used to indicate the complement of a variable. A standard IC usually houses 6 inverters
in one chip. For example if we wish generate the 1’s complement of a binary number, an inverter can be
placed at each of the output digits.
This study source was downloaded by 100000833739254 from CourseHero.com on 10-25-2021 15:47:06 GMT -05:00
Page 1 of 5
https://www.coursehero.com/file/81117526/Note-04-Gates-Matrixpdf/
Note_04_Gates & Matrix PHYS 355 Electronics September 2020
A B F F=A+B A B F F=A B
0 0 1 0 0 1
0 1 0 A 0 1 1 A
F B F
1 0 0 B 1 0 1
1 1 0 1 1 0
BUFFER
Sometime it is necessary to have a one-to-many connection. A buffer will provide more current sinking or
sourcing to the many subsequent inputs.
A F F=A
0 0
m
A
er as
1 1 F
co
eH w
TRI-STATE
A tri-state buffer has an extra control pin. When En 1, the signal passes right through. When En 0,
o.
rs e
the output is put in a high impedance state, which effectively isolate the input from the output. The output
ou urc
Z means hi-Z.
En A F F=En A+En Z
o
0 Z
aC s
0 En
1 Z
vi y re
0 0
1 A F
1 1
XOR and XNOR X F = 1 only when A is different from B.
ed d
ar stu
A B F F=A+B A B F F=A B
0 0 0 0 0 1
0 1 1 A 0 1 0 A
1 0 1 F 1 0 0 F
B B
is
1 1 0 1 1 1
Th
sh
This study source was downloaded by 100000833739254 from CourseHero.com on 10-25-2021 15:47:06 GMT -05:00
Page 2 of 5
https://www.coursehero.com/file/81117526/Note-04-Gates-Matrixpdf/
Note_04_Gates & Matrix PHYS 355 Electronics September 2020
States
Binary numbers are displayed as a bit pattern. We would like to describe the pattern as an object so we can
manipulate it in a mathematical fashion. We represent the state of an input or output with a ket symbol
borrowed from quantum mechanics. An input has a one-bit pattern, and is represented by |a which has
two possible states: |a = |0 or |1 .
m
1 0 0 0
er as
1 0 0 0
0 1 0 , 0
|a,b =|00 ,|01 ,|10 , |11 = , , 0 1 0 0
co
0 0 1 0
eH w
0 0 1 0
0 0 0 1 0 0 0 1
o.
rs e
The 4 states can be represented by 4 unit vectors in a 4-dimensional space. They can be compacted into a
ou urc
4x4 matrix in a similar fashion as in the case of a single bit pattern |a .
For 3 variables there will be 8 input states, represented by an 8 by 8 matrix.
o
Logic Matrix
aC s
vi y re
The 2-input OR gate is represented by: F = A+B, where the + sign is defined by the TRUTH table. The
truth table is a look up table. Can we establish some mathematical (or functional) relationship between
the inputs and the output?
ed d
AB c1
is
c2 AB AB AB AB
In matrix form we would write
AB
FOR ( A, B) c1 c2 c3 c4 or
Th
c3
AB
AB c4
A B F
sh
0 0 0
0 1 1 The truth table prompts us to choose the coefficients c1 , c2 , c3 , c4 as 0, 1, 1, 1
1 0 1
1 1 1
This study source was downloaded by 100000833739254 from CourseHero.com on 10-25-2021 15:47:06 GMT -05:00
Page 3 of 5
https://www.coursehero.com/file/81117526/Note-04-Gates-Matrixpdf/
Note_04_Gates & Matrix PHYS 355 Electronics September 2020
The truth table can be replaced by a function (matrix format). FOR ( matrix op )( state variables)
1 0 0 0
0 1 0 0 1 0 0 0
(OR) |a,b = 1 0 0 0 = |0 ,|1 ,|1 ,|1 =F
m
=
er as
0 1 1 1 0 0 1 0 0 1 1 1
0 0 0 1
co
eH w
Regular matrix multiplication, (row) (column) yield the output matrix. Then transform back to states.
o.
rs e
The 4 output states agree with the TRUTH table of an OR gate.
ou urc
The matrix multiplication is trivial since |a,b is unity matrix.
(AND)= 1 1 1 0
o
1 1 1 0
(AND)|a,b = 1 1 1 0 = 0 0 0 1 = |0 ,|0 ,|0 ,|1
vi y re
unity
0 0 0 1 A B F
0 0 0
0 1 0
The result checked out with the TRUTH table of an AND gate. 1 0 0
ed d
1 1 1
ar stu
|0 |1 |1 |0
Th
0 1 0 1 1 0
Operation: (NOT) | a = = each state becomes its complement.
1 0 1 0 0 1
|1 |0
sh
1 1 1 0 0 0 0 1
On a 4-state function (NOT)(AND) = 0 1 = = (NAND) operator
1 0 0 0 0 1 1 1 1 0
1 0 0 0 A B A B
0 1 0 0 0 0 0 1 0 0 1
(NAND)|a,b = 0 0 0 1 = = |1 ,|1 ,|1 ,|0 0 1 1
1 1 1 0 0 0 1 0 1 1 1 0
0 0 0 1 1 0 1
1 1 0
This study source was downloaded by 100000833739254 from CourseHero.com on 10-25-2021 15:47:06 GMT -05:00
Page 4 of 5
https://www.coursehero.com/file/81117526/Note-04-Gates-Matrixpdf/
Note_04_Gates & Matrix PHYS 355 Electronics September 2020
We need to exercise some common sense when using the operators. It is okay to write (NOT) | a ,
as the complement of the state|a . But it makes little sense to write (NOT) | ab , since there is no
complement to a 4-state. Also the operators (AND)(AND) or (AND)(OR) make no sense.
m
er as
co
eH w
o.
rs e
ou urc
o
aC s
vi y re
ed d
ar stu
is
Th
sh
This study source was downloaded by 100000833739254 from CourseHero.com on 10-25-2021 15:47:06 GMT -05:00
Page 5 of 5
https://www.coursehero.com/file/81117526/Note-04-Gates-Matrixpdf/
Powered by TCPDF (www.tcpdf.org)