Prepared by: Syed Saad Ahmed 2012
1 | P a g e
LECTURE 3
In digital logic there is true or false because we use transistor as a switch and switch work as on and off.
On is 1 and off is 0.So we use some logic and we should know the Boolean algebra and we should know
the digital logic as well.
Bit (Space):
If you want to add in Boolean algebra there is only two possibilities 1 and 0, in computer 1 is one bit and
0 is another bit. Mathematically 0+0+0=0 and 000 both equal to zero these functions are true
mathematical but here three zeros are actually three bits, more space, because in chip, in computer or
in a circuits zero is a bit.
No. of possibilities:
If I have only choice of one bit then it will be 0 or 1. If I have choice of combination of two bits then the
possibilities will be 00, 01, 10 and 11.
The no. of possibilities can be determined by 2
n
.
Resolution:
If I want to convert any scalar quantity, any non digital quantity, or decimal quantity into binary
then we have to know that how many bits are available. let say I have minimum voltage 0 watt
and max is 5 watt and I have only 1 bit option, and then I have two choices, 1 is five and 0 is 0,
but If I say that I have two bit option then we have four choices.
Two bit option: If I have 2 bit option then our resolution will be,
Resolution
Resolution= 1.67
Now you have four choices, -1 is used because our first choice is 00.
Now, 00=0
01=1.67
10=2*1.67=3.33
11=3*1.67=5
Prepared by: Syed Saad Ahmed 2012
2 | P a g e
When we have only one bit option then we had only one choice minimum is zero maximum is one, but
now we have two bit option so we can resolve our analog quantity in better mapping.
When we could not see the bright picture our screen then we said that resolution is not good because
there is resolution is less, and when we have more resolution, more pixels then we can see the bright
picture. So now 5 watt quantity we can divide it into four digital maps. Conclusion is that if we have
more bit then we can resolve better.
Three bit option: Now if the number of bit option is 3 then
Now, 000=0
001=0.714 And so on,
If I have a black and white television so the choice is only of two colors, the darker color will be black
and lighter is white, but if I have four options then the colors will look different this is the resolution, we
are doing this because if we dont do this then the choice will be very limited. We can see different
images with the help of resolution.
When we want to convert some analog logic in to the digital we need to have more numbers of bits. In
hardware it is hard to create hardware of having more number of bits. The real world is analog it is not
digital.
Why we have to apply digital logic? Because we use transistor as a switch and switch has only two
choices on and off. When we have to make logic with the help of Boolean function we have to create
some types of logic.
OR LOGIC:
The whole logic is true if one logic is true. If I say Today is Thursday or it is raining then this sentence is
true because one logic is right here. (The day was Thursday). Or logic is just like addition.
True+ True= True 1+1=1 True+False= True 1+0=1
False+ True=True 0+1=1 False+False=False 0+0=0
We have opposite logic of OR is NOR.
AND LOGIC:
The whole logic is false if one logic is false. If I say Today is Thursday or it is raining then this sentence
is false because one logic is false. (There was not raining). And logic is just like multiplication.
Prepared by: Syed Saad Ahmed 2012
3 | P a g e
True* True= True 1+1=1 True*False= False 1+0=0
False* True= False 0+1=0 False*False=False 0+0=0
We have opposite logic of AND is NAND.
NOT LOGIC:
Not is the inverter, whatever we say it will invert it.
We have real gates in the market which works like this called AND gate, OR gate, NOR gate, NAND gate
and NOT gate etc. We use the combination of gates to create any logical function.
BOOEAN ADDITION:
1+1= 10
1+0=1
0+1=1
1+1+1=11
y 1111+1010=11001
y 101+111=1100
Same as above, we can do in subtraction.
BOOEAN MULTIPILICATION:
5*7=?
First we have to convert 5 and 7 into binary then multiply and check it if we got 35 or not?
5= (101)2
7= (111)2
y 101*111=11001
BOOEAN DIVISION:
In division there is only one method to divide the binary numbers which is first we have to convert it
into decimal and then simply divide it and then again convert it into binary system.