Skip to content

Latest commit

 

History

History
388 lines (279 loc) · 14 KB

meetup-wk4.org

File metadata and controls

388 lines (279 loc) · 14 KB

Digital design fundamentals

Copyright notice
The notes below are modified copies of the academic module CS-120 “Digital Design”: http://www.csd.uoc.gr/~hy120/ copies or posting are not made or distributed for profit or commercial advantage.
© University of Crete.

http://www.csd.uoc.gr/~hy120/16f/copyright.html

Basic logic components

SPDT switches

Switches which have 3 pins (1 input, 2 output).

./img/SPDT.png

Odd Parity

Odd parity is the exclusive OR (XOR).

./img/ODD-PARITY.png

Even Parity

Even parity is the equality check.

./img/EVEN-PARITY.png

Relays

Switches which can be used as memory. The relay below has a DPDT switch (double SPDT) and a coil. If the coil is activated (pins: 1, 8) the DPDT switch moves from its default state (input pins: 3, 6 to output pins: 2, 7) to the active state (input pins: 3, 6 to output pins: 4, 5). Relay have been used as basic memory components or mechanical clocks.

./img/RELAY.png

Relay 2-to-4

./img/RELAY-2-4.png

Truth tables of logic gates

In principle we need three basic gates to compose every other gate: logical NOT, logical AND, logical OR.

NOT

INPUTOUTPUT
ANOT A
01
10

Not-gate-en.svg
CC BY-SA 3.0, Link

AND

INPUTINPUTOUTPUT
ABA AND B
000
010
100
111

AND ANSI Labelled.svg
By Inductiveload - Own work, Public Domain, Link

OR

INPUTINPUTOUTPUT
ABA OR B
000
011
101
111

OR ANSI Labelled.svg
By Inductiveload - Own work, Public Domain, Link

XOR

INPUTINPUTOUTPUT
ABA XOR B
000
011
101
110

XOR ANSI.svg
By jjbeard - Own Drawing, made in Inkscape 0.43, Public Domain, Link

NOR

INPUTINPUTOUTPUT
ABA NOR B
001
010
100
110

NOR ANSI Labelled.svg
By Inductiveload - Own work, Public Domain, Link

XNOR

XNOR is the logical equality.

INPUTINPUTOUTPUT
ABA NOR B
001
010
100
111

Xnor-gate-en.svg
CC BY-SA 3.0, Link

Combinational circuits

High level description of combinational circuits.

./img/combinational-cirsuits.png

Decoder 2to4

logisim file
./src/logisim/decoder_2_to_4.circ

./img/DECODER-2-4-7408.png

Multiplexer 4to1

Multiplexer 4-to-1 using a decoder 2-to-4.

logisim file
./src/logisim/multiplexer_4_to_1.circ

./img/MUX-4-1.png

A multiplexer’s module below.

Multiplexer 4-to-1.svg
By en:User:Cburnett - Own work This vector image was created with Inkscape., CC BY-SA 3.0, Link

Encoding

Seven segment display

7 segment display labeled.svg
By user:h2g2bob - Own work using Inkscape, CC BY-SA 3.0, Link

Combinational circuit and truth table

How to print numbers 0-3 to 7-segment alphanumeric display.

  • You need only 2 bits to display numbers 0-3 using binary numbers
  • Check which LEDs should be switched on (value = 1, ie. logical TRUE) to display number 0
    • Repeat for all numbers
In0In1-ABCDEFG
001111110
010110000
101101101
111111001
How to make the logical functions
Express using basic logic operations (AND, NOT, OR) the output (7-segments) based on the input (2-bits)
A = NOT( In0’ ⋅ In1 )
B = 1
C = NOT( In0 ⋅ In1’ )
D = A
E = In1’
F = In0’ ⋅ In1’
G = In0

Adders

Half-adder and full-adder implementation.

logisim file
./src/logisim/half_full_adder.circ

./img/ADDER.png

2s complement

The inner circle shows the unsigned numbers (1s complement), the outer (helix) shows the signed numbers (2s complement).

./img/2scomplement.png

Memory components

RS Flip-Flop with relays

Makes use positive feedback to create a latch, 1 bit of mechanical memory.

./img/sr-latch-relay.png

Latch

Latches are basic module for implementing memory.

logisim file
./src/logisim/latches_RS_D.circ

./img/latches.png

Register

Shift register

logisim file
./src/logisim/shift_register.circ

./img/shift-register.png

Master-slave register

The basic memory component. Below master-slave register using two latches RS, activated by positive edge clock.

logisim file
./src/logisim/master_slave_register.circ

./img/master-slave.png

Sequential circuits

High level description of sequential circuits.

./img/sequential-cirsuits.png

Counter

A 3 bit counter.

logisim file
./src/logisim/3_bit_counter.circ

./img/3bit-counter.png

Finite state machine (FSM)

FSM for adaptive control of traffic lights. A and B are cars on a crossroad.

./img/cars.png

logisim file
./src/logisim/analogy_1_to_1.circ

./img/fsm-1-1.png

SAdBdAgoBgonS
000000
001011
010100
011011
100001
101011
110100
111100
  • Ago = Ad · [ S + (S’)·(Bd’) ]
  • Bgo = Bd · [ S’ + (S)·(Ad’) ]
  • nS = S · Ad’ + S’ · Bd

Arithmetic Logic Unit (ALU)

A basic component which can do multiple functions, like addition, subtraction, logical AND etc.

logisim file
./src/logisim/ALU.circ

./img/ALU.png

mode:
000ALUoutA+B(add)
001ALUoutA-B(sub)
010ALUoutA AND B(and)
011ALUoutNOT (A OR B)(nor)
1xxALUoutB(passB)