Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Boolean Help

Status
Not open for further replies.

PG1995

Active Member
Hi, again, :)

If we have a mathematical function, say f(x) = y = 2x + x^2, we can graph it with a graphing calculator or with some math program. I'm going to learn some topics which involve Boolean functions and logic gates where gates are represented in terms of Boolean functions. For example, the given Boolean expression AB + A(B+C) + B(B+C) can be implemented using logic gates. Is there some software which I can use to do these things? I can't learn Verilog for this in such short time. In other words, is there some software which I can use to play around with Boolean algebra and logic gates? Thanks for your help and time.

Regards
PG
 
its easy with simple boolean algebra..do some math,
 
Hi,

Boolean is somewhat simpler than regular algebra, but more often than not there will be more variables to deal with because there are usually several inputs and each input requires a separate variable. For your expression:
AB + A(B+C) + B(B+C)

there are three variables, A, B, and C. To see what all the possible outcomes could be you can generate all possibilities of all three inputs. This boils down to:
000
001
010
011
100
101
110
111

Note that there are 2^n possible input combinations, where n is the number of inputs. What you would do then is to apply those 8 possibilities to your expression and calculate the output for each combination. That would give you 8 possible output states.

Note that AB simply means multiply A times B, and A+B means add A to B but anything over 1 becomes 1 as in the following table:
0+0=0
1+0=1
0+1=1
1+1=1

Note this is just addition but we make 1+1 that normally equals 2 to be 1 instead of 2 because anything over 1 becomes 1.
 
Last edited:
PG1995,

You should be doing this problem by manually; at least at first. I wrote a rudimentary program a while back that gives the minterms of a Boolean expression. You can use it to check your answers. Once you know the minterms, you can reduce it with a Karnaugh map or tabulation techniques. I had another program that reduced the minterms, but I lost it in a computer crash. Should have had it backed up.

Ratch
 

Attachments

  • BOOLIT.ZIP
    4.7 KB · Views: 244
Hi Ratch,

That reminds me i have a program around somewhere too. Been so long since i needed that kind of thing :)

In a pinch when there are not too many inputs you can even get away with something like this:

Code:
for A=0 to 1 do
  for B=0 to 1 do
    for C=0 to 1 do
      DoLogicExpressionAndPrintResults(A,B,C)
    end for
  end for
end for
 
Last edited:
is there some software which I can use to play around with Boolean algebra and logic gates?
You can play around with logic gates in a simulator, such as the free download LTSpice.
 
Thanks a lot, MrAl, Ratch, Alec.

@Ratch: The example expression I used in the original post was only there to give you an idea what I was looking for. I wasn't specifically working on that expression. Thank you for the program. I have downloaded it. I have also found a similar program here.

Regards
PG
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top