Search This Blog

Tuesday, March 13, 2012

Basic Logic Gates & Boolean Expressions



Boolean Algebra
• Digital electronic systems manipulate binary information
• To design such systems we need a convenient
mathematical framework
– useful systems are often too complicated to keep in our head
– Boolean algebra provides this framework
• Points in a circuit are represented by Boolean Variables
• Boolean algebra allows us to specify relationships
between Boolean variables
– Hence Boolean algebra can be used as a design tool for digital
electronic circuits

Boolean Variables
Boolean variables take the value either 0 or 1 only
– if a variable doesn't have the value 0, then it must have the value 1
– if a variable doesn't have the value 1, then it must have the value 0
• In digital electronics:
– Boolean 0 and 1 correspond to the binary 0 and 1
• In logic:
– 1 and 0 are sometimes called true and false
• We use symbols to represent Boolean variables
– just like with ordinary algebra
– eg: A, B, C, X, Y, Z, etc
– typically a single character
– typically upper case
• Three Logic operations: AND, OR, NOT

 Boolean Algebra to Describe Logic
• Boolean representation: 4 variables H, R, F and S
• H represents the On/Off switch of the entire heating
system
– H = 1 when the heating system is switched on.
• R represents the room thermostat
– R = 1 when the room temperature is lower than required
• F represents the frost thermostat
– F = 1 when the external temperature is near freezing
• S represents the On/Off switch of the boiler
– S = 1 when heat should be generated by the boiler 
• S should be 1 when (H=1 and R=1) or when (F=1 and
R=1)
• In Boolean algebra we use  for 'and' and + for 'or'
S = H • R + F • R
• If we could build an electronic circuit which implemented
this Boolean expression we could sell it as a simple
heating system controller.
Boolean Operators 
– Like ordinary algebra, Boolean algebra allows for 
operations on its variables
• NOT - Takes the complement (inverse) of a single variable
– Called 'NOT K' and written K
• eg: Let K represent a key on a computer keyboard and let K = 1 
mean the key is pressed
– We now have a variable which shows the state of the key:
• K=1 shows key is pressed
• K=0 shows key is not pressed
– If we take the compliment of K we have a variable which 
also shows the state of the key but in the opposite sense
• K=1 shows key is not pressed
• K=0 shows is pressed
Basic Boolean Operators & Logic Gates 




Summary of OR operation

• Produce a result of 1 whenever any input is 1. 
Otherwise 0.
• An OR gate is a logic circuit that performs an OR 
operation on the circuit's input
• The expression x=A+B is read as “x equals A 
OR B”


Summary of the AND operation

• The AND operation is performed the same as 
ordinary multiplication of 1s and 0s.
• An AND gate is a logic circuit that performs 
the AND operation on the circuit’s inputs.
• An AND gate output will be 1 only for the 
case when all inputs are 1; for all other cases 
the output will be 0.
• The expression x=A•B is read as “x equals A 
AND B.”









No comments:

Post a Comment