Create simple circuit using Logic gates

Electronics & Electrical Engineering Topics
User avatar
Nandika
Captain
Captain
Posts: 247
Joined: Sat Oct 15, 2011 11:40 am
Location: Galle-Sri Lanka

Create simple circuit using Logic gates

Post by Nandika » Sun Aug 26, 2012 8:26 pm

Hello Friends,
This is a simple trick about simple logic circuit designing.I think,This is important for O/L IT and A/L Physics.
I use my poor English.Sorry for it.Never misunderstand.

I explain it using some examples.

Example 1:
Create a simple logic circuit for detect prime numbers from 0 to 7.

1.simple it,write a truth table...

convert 0 - 7 to binary.
0=000
1=001
2=010
3=011
..
..
7=111

2.write output as "1" for prime numbers only.

Table-
t1.PNG
t1.PNG (8.28 KiB) Viewed 10694 times
3.This is the point...
Get lines which output is "1" and write expression like following.

At input number is 2(=010) output is "1". Now write expression like this.
ex1.PNG
ex1.PNG (608 Bytes) Viewed 10694 times
If input is "0",get as "Bar". In this line,A and C are "0",therefore,we get A bar and B bar.
:geek: ?

ok..this is another line.
Get line which input is 5.
A=1 ... therefore, write expression A.Not A bar.
B=0 ... therefore,write B bar.
C=1 ... Write C
At finally,Expression should be,
ex2.PNG
ex2.PNG (627 Bytes) Viewed 10694 times
ok...End of trick.if you have a question,ask... :)

this is all expression corresponding to each line.
t2.PNG
t2.PNG (10.46 KiB) Viewed 10694 times
4.Now,input this all expression to OR gate.Get output(Q)...
ex3.PNG
ex3.PNG (1.17 KiB) Viewed 10694 times
5.Create circuit.
According above output expression we want,
A bar,B bar,C bar.therefore,We want to use NOT gate.
For get input for last OR gate,want to use three input AND gate.
Last we want a 4 input OR gate.

This is the circuit...
c1.PNG
c1.PNG (8.33 KiB) Viewed 10694 times


Example 2:
This is a question given G.C.E(A/L )-2004 Question number:-5.(iii)

Create a circuit for emergency lamp for automatically on at night power cutting.This light has a switch for light up the lamp at anytime.
Use following input.
A=1 : switch on
A=0 : switch off
B=1 : at night
B=0 : at day
C=1 : while power cutting
C=0 : while power ok

use output,
X=1 : emergency lamp on
X=0 : emergency lamp off

OK...Now answer....

1.write a truth table.
Truth table with corresponding AND expression.
Truth table with corresponding AND expression.
t3.PNG (10.95 KiB) Viewed 10694 times
2.Get lines which output is "1" and write expression.(red on above table.)

line 3 :
A=0
B=1
C=0
Therefore,Expression should be,
ex4.PNG
ex4.PNG (566 Bytes) Viewed 10694 times
line 5 :
A=1
B=0
C=0
Therefore,Expression should be,
ex5.PNG
ex5.PNG (505 Bytes) Viewed 10694 times
line 6 :
A=1
B=0
C=a
Therefore,Expression should be,
ex6.PNG
ex6.PNG (498 Bytes) Viewed 10694 times
line 7 :
A=1
B=1
C=0
Therefore,Expression should be,
ex7.PNG
ex7.PNG (508 Bytes) Viewed 10694 times
line 8 :
A=1
B=1
C=1
Therefore,Expression should be,
ex8.PNG
ex8.PNG (499 Bytes) Viewed 10694 times

3.Write Output expression using OR operation.
ex9.PNG
ex9.PNG (1.23 KiB) Viewed 10694 times
4.Create circuit...
According to above output expression,
We want,
NOT Gate - 2 (for B bar and C bar,No A bar in expression)
3 input AND Gate - 5
5 input OR Gate - 1
c2.PNG
c2.PNG (11.97 KiB) Viewed 10694 times
OK
I think this may be useful to you. :)
If you have any problem,ask.
Sorry for my poor English again. :(
User avatar
Rksk
Major
Major
Posts: 730
Joined: Thu Jan 07, 2010 4:19 pm
Location: Rathnapura, Sri Lanka

Re: Create simple circuit using Logic gates

Post by Rksk » Mon Aug 27, 2012 2:55 pm

Nice!

2012 question too was intererting. I done it first of all. :D

[ Post made via Mobile Device ] Image
User avatar
Nandika
Captain
Captain
Posts: 247
Joined: Sat Oct 15, 2011 11:40 am
Location: Galle-Sri Lanka

Re: Create simple circuit using Logic gates

Post by Nandika » Mon Aug 27, 2012 6:30 pm

:D
Did not answer Electronic question?I think It's the easiest question than others.
User avatar
Rksk
Major
Major
Posts: 730
Joined: Thu Jan 07, 2010 4:19 pm
Location: Rathnapura, Sri Lanka

Re: Create simple circuit using Logic gates

Post by Rksk » Mon Aug 27, 2012 6:44 pm

Nandika wrote::D
Did not answer Electronic question?I think It's the easiest question than others.
The Electronic one was on gates. And Electricle one was on resistance. Normally I don't like number calculations because I do mistakes. So I did electronic (on gates) one.


[ Post made via Mobile Device ] Image
User avatar
Rksk
Major
Major
Posts: 730
Joined: Thu Jan 07, 2010 4:19 pm
Location: Rathnapura, Sri Lanka

Re: Create simple circuit using Logic gates

Post by Rksk » Mon Aug 27, 2012 11:28 pm

I simplified your both of circuits using Boolean Logics.
Boolean Logics
Boolean Logics
ec truth.gif (17.03 KiB) Viewed 10662 times
This is out of A/L physics, but used in Maths (probability).

01.
Image
ec gate2.jpg
ec gate2.jpg (9.59 KiB) Viewed 10662 times
02.
Image
ec gate.jpg
ec gate.jpg (8.92 KiB) Viewed 10662 times
User avatar
Nandika
Captain
Captain
Posts: 247
Joined: Sat Oct 15, 2011 11:40 am
Location: Galle-Sri Lanka

Re: Create simple circuit using Logic gates

Post by Nandika » Wed Aug 29, 2012 5:04 pm

Nice.... :)
I haven't more knowledge about this boolian equation.
Actually ,I wished someone post about simplified circuit.

Please,If you can post this simplification step by step.
Thanks.
User avatar
Rksk
Major
Major
Posts: 730
Joined: Thu Jan 07, 2010 4:19 pm
Location: Rathnapura, Sri Lanka

Re: Create simple circuit using Logic gates

Post by Rksk » Wed Aug 29, 2012 10:50 pm

oh! I've done two mistakes in my last reply. The correct ones are below.
ec1.jpg
ec1.jpg (43 KiB) Viewed 10639 times
ec2.JPG
ec2.JPG (48.79 KiB) Viewed 10639 times
[ Post made via Mobile Device ] Image
User avatar
Nandika
Captain
Captain
Posts: 247
Joined: Sat Oct 15, 2011 11:40 am
Location: Galle-Sri Lanka

Re: Create simple circuit using Logic gates

Post by Nandika » Sat Sep 01, 2012 4:45 pm

Excellent work Rksk.... :biggrin:

But,I have a problem in (02).
correct..PNG
correct..PNG (45.51 KiB) Viewed 10619 times
Where is + A.B.(C bar + C) in 3rd line of simplification?

Explain some about red sentence ..

thank you...
User avatar
Rksk
Major
Major
Posts: 730
Joined: Thu Jan 07, 2010 4:19 pm
Location: Rathnapura, Sri Lanka

Re: Create simple circuit using Logic gates

Post by Rksk » Sat Sep 01, 2012 9:31 pm

Nandika wrote: Where is + A.B.(C bar + C) in 3rd line of simplification?
A.B bar.(C bar + C) + A.B.(C bar + C) = A.B bar + A.B = A.(B bar + B) = A
Nandika wrote: Explain some about red sentence ..
Let's think X = Abar.B.Cbar + A
if A = 0; X = 1.B.Cbar + 0 = B.Cbar
if A = 1; X = 0.B.Cbar + 1 = B.Cbar + 1

now let's think Y = B.Cbar + A
if A = 0; Y = B.Cbar
if A = 1; Y = B.Cbar + 1

Both give same answer.
User avatar
Nandika
Captain
Captain
Posts: 247
Joined: Sat Oct 15, 2011 11:40 am
Location: Galle-Sri Lanka

Re: Create simple circuit using Logic gates

Post by Nandika » Sun Sep 09, 2012 11:38 am

:D I got it,Rksk thanx

As this,According to Complementary law....
he he.PNG
he he.PNG (35.73 KiB) Viewed 10568 times
Am I correct...Please tell?
Last edited by Nandika on Sun Sep 09, 2012 11:46 am, edited 1 time in total.
Post Reply

Return to “Electronics & Electrical Engineering”