220 likes | 621 Views
Digital Logic. Alan Murray. Agenda. Basic logic Logic Functions : Revision Logic and electronics : Introduction What’s inside a logic gate? Using logic gates in a system : example. Basic Logic. Uses “ones†and “zerosâ€, “1†or “0†Or “true†and “falseâ€, “on†and “offâ€
E N D
Digital Logic Alan Murray
Agenda • Basic logic • Logic Functions : Revision • Logic and electronics : Introduction • What’s inside a logic gate? • Using logic gates in a system : example Alan Murray – University of Edinburgh
Basic Logic • Uses “ones” and “zeros”, “1” or “0” • Or “true” and “false”, “on” and “off” • Nothing “in between” true and false • In electronics, these are, of course, represented by voltages and currents • e.g. • 3V = “true”, logic “1” • 0V = “false”, logic “0” • This underlies every digital appliance/chip/system in the universe Alan Murray – University of Edinburgh
Examples of logical signals • Electric lighting controller • “1” → light on … 240V applied • “0” → light off … 0V applied • Burglar alarm sensor • “1” → intruder present and moving • “0” → no intruder (or dead intruder!) • Hi-fi warning light • “1” → signal strength too high • “0” → signal strength AOK Alan Murray – University of Edinburgh
Use of logic? • If the Hi-Fi signal is too high • Switch the speakers off • If there is an intruderANDthe alarm is on • Then sound the siren • If the fuel gauge says “low”ORthe oil pressure gauge says “low”ANDthe ignition is on • Then illuminate the warning light Alan Murray – University of Edinburgh
240V mains supply Logic and Electronics/Electricity Light switch Fuse Switch open circuit → “off” Fuse blown → “off” Only with both switch AND fuse on does the bulb light up. “Bulb on” = “Switch on” AND “Fuse on” Or Bulb = Switch AND Fuse, B = S.F Even more completelyBulb = Switch AND Fuse AND NOT(Power Cut)! Alan Murray – University of Edinburgh
Simple logic functions • B = NOT(A) • A=0, B=1 • A=1, B=0 • C = A.B (A AND B) • C = 1 if both A AND B are 1 • C = 0 otherwise • C = A+B (A OR B) • C = 1 if either A OR B (or both) is 1 • C = 0 otherwise Alan Murray – University of Edinburgh
Hand out “fill in blanks” • And registration sheet Alan Murray – University of Edinburgh
Out = NOT(In) Out = In In Out Logic Function : “NOT” Written as Boolean algebra Symbol used in a circuit Input and output voltages Written as a “truth table” Alan Murray – University of Edinburgh
C = NOT(A+B) C = A+B C = “1” Only ifneither A NOR B is = “1” A C B Logic Function : “NOR” Alan Murray – University of Edinburgh
A A D = A+B D = A.B B B A A A C = NOT(A+B) C = NOT(A.B) C = NOT(A.B) B B B A C B More Gates = Alan Murray – University of Edinburgh
B C More Gates A E = NOT(A.B.C.D) D Alan Murray – University of Edinburgh
A D = AÅB B A C = NOT(AÅB) B Ctrl A B Ctrl More “Gates” Simulation#1 Simulation#2 Alan Murray – University of Edinburgh
A D C C D B “Latches” – a “flip-flop” AB =00 is boring – sets both outputs to “1” AB = 01 sets CD to 10 AB = 10 sets CD to 01 Most intriguingly,AB = 11 means that either CD=10 or CD=01 is a stable, self-consistent set of outputs Thus AB = 11 “remembers” or “latches” whatever state CD was in before AB became 11. Alan Murray – University of Edinburgh
Fill in the blanks A D = AB B E = AB+C C Alan Murray – University of Edinburgh
D OFF A Ctrl C To speaker ♪ Ctrl A 0 1 0 B Vsafe D B + Reset - 1 0 1 Application? Alan Murray – University of Edinburgh
3V 0V 3V 0V What’s in a Logic Gate?(0V=“0”, 3V=“1”) Alan Murray – University of Edinburgh
3V 3V 0V 0V What’s in a Logic Gate?(0V=“0”, 3V=“1”) 3V 0V 0V 3V Alan Murray – University of Edinburgh
Out = NOT(In) Out = In In Out Logic Function : “NOT” = In Out Alan Murray – University of Edinburgh
In Out P-type N-type MOS Transistors … There are two types … Which behaves like this … Which behaves like this … Can you make a “NOT” gate out of these? Alan Murray – University of Edinburgh
Summary • Basic logic • Why it is useful – some simple examples • Logic gate symbols • Latches – remembering things • Simple application • What’s in a logic gate? Alan Murray – University of Edinburgh