Logics AND electronics

Hello people!
Recall the previous post where I wrote about how 0 and 1 can not switch on the device. And only 1 AND 1 can make up to 1. That's just how logical operators work!

AND or &&
Think of it as a circuit with 2 switch in a series and a bulb at the end. The bulb can not light up if any one of the switchbis off. For the bulb to light up both the switches must be on. So 
1 AND 1 gives you 1
0 AND 0 is 0
0 AND 1 is 0
1 AND 0 is 0
Representation of AND gate in a circuit


OR or ||
In this case, redesign your circuit. Place the switches in parallel. What can you expect now? The switches in parallel makes it easy. Even if any one of the switch is on you get the bulb light up. And hence,
0 OR 1 is 1
1 OR 0 is 1
1 OR 1 is 1
0 OR 0 is 0
Representation of OR gate in a circuit


NOT or ~
NOT is absence of something. This means if something is absent, then surely something else is present. If the switch is not on then switch is off. If it's NOT 1 then yeah, it's 0. It's that simple!
NOT 1 is 0
NOT 0 is 1
Representation of NOT gate in a circuit


These are the basic operations. Besides these we have few more operations that can be performed on binary data. The rest are combination of these 3 in different orders. We will see that soon. Stay connected.

Comments

Popular posts from this blog

Print in Python

Coding Digits

Calculating bits of bits.