# Computer Logic & Logic Gates Justin Champion. IITCT Contents Introduction to Logic Look at the different Logic Gates Summary.

## Presentation on theme: "Computer Logic & Logic Gates Justin Champion. IITCT Contents Introduction to Logic Look at the different Logic Gates Summary."— Presentation transcript:

Computer Logic & Logic Gates Justin Champion

IITCT Contents Introduction to Logic Look at the different Logic Gates Summary

IITCT - Logic George Boole 1815 to 1864 Boole approached logic in a new way reducing it to a simple algebra, incorporating logic into mathematics. He also worked on differential equations, the calculus of finite differences and general methods in probability.

IITCT - Logic Boolean Logic Something is either True or False 1 or 0 Correct or Wrong Computers use this to make decisions A computer is basically a large number of switches Each of these can be either in the state of on (1) or off (0) We do use this kind of logic every single day

IITCT You can only get into the night club if you have a coloured suit True Get into Club False Refused Entry to Club

IITCT Logic As seen you use this all the time If (suit coloured) then Entry to club Else Refused Entry You can also put multiple conditions together Conditional Logic If (Suit Coloured and hat on the head) then Entry to club Else Refused Entry

IITCT You can only get into the club if you have a coloured suit and a hat on your head! False Refused True Accepted False Refused False Refused

IITCT All of the previous are examples of Boolean Logic Basic Logic Conditions Available AND OR NOT Logic Symbols used in diagrams AND. OR+ NOT

IITCT Use of The Logic Symbols If person wearing a Jacket AND a tie then enter Entry = Jacket.Tie If person wearing a jacket which is NOT white AND a tie then enter Entry = (jacket.white).tie

IITCT What you have seen is every day examples of Logic This is exactly what is used inside of computers to make decisions The following section will look at the formal method describing truth tables This is no more complicated than the previous examples It is just a matter of realising this fact

IITCT Switches To represent the logic of 1 and 0 we use switches which turn off (0) and on (1) These switches are referred to as transistors Emitter Collector Base 0 Volts No Flow Emitter Collector Base 1 Volt Flow

IITCT Processors use large numbers of these transistors to make decisions AMD 3200+ processor has 54.3 Million transistors!

IITCT Example Truth Tables ABA.BA+BA 000011 010110 111100 100100 AND ORNOT NOT (A or B)

IITCT To create a truth table first of all list all of the conditions For binary values the number of unique conditions will be 2 number of conditions So for this example it will 2 2 giving 4 unique conditions For 3 conditions it will be 2 3 giving 8 unique conditions AB 00 01 11 10

IITCT Try a truth table yourself Create a truth table for If man has long hair and not a member entry refused

IITCT Answer Create a truth table for If person has long hair and not a member entry refused Long HairMemberNot MemberLong Hair.Member 010Accepted 001 110 101Refused

IITCT What this logic looks like in electrical circuits First the truth table ABX 000 010 100 111

IITCT What this logic looks like in electrical circuits X = A.B A = 0, B = 0, X=0 Light is off AND Gate

IITCT What this logic looks like in electrical circuits X = A.B A = 1, B = 1, X=1 Light is on AND Gate

IITCT The logic used can also be drawn out on a diagram

IITCT And Gate - X = A.B

IITCT Alarm System A = Alarm Set B = Door Sensor Opened X = Alarm Sounding ABX (A.B) 000 011 101 111

IITCT OR Example X = A + B Alarm Set A = Window Opened B = IR Sensor Detects movement X = Alarm Sounding ABX 000 011 101 111

IITCT The Boolean logic gates we have discussed are NOT exhaustive There are a lot more gates which can be used with increasing complexity Example XOR XAND Later on in the course these logic gates will be used to carry out mathematical functions

IITCT Why we learn this Boolean logic is used in electronics and computers to carry out actions Programming Languages use this logic to test conditions It is the basis of all computing

IITCT Summary of what we have discussed Boolean Logic

Similar presentations