Fundamental Hardware Elements of Computers: Building circuits

PAPER 2 - ⇑ Fundamentals of computer systems ⇑

← Boolean gate combinations Building circuits Boolean algebra →


A common question in the exam is to be given some boolean algebra and be asked to express it as logic gates. Let's take a look at an addition and subtraction example that you should be familiar with:


First we are going to deal with the inner-most brackets


Finally we combine this answer with the


It will work exactly in the same way for boolean algebra, but instead of using numbers to store our results, we'll use logic gates:

Example: Building circuits

As with any equation, we are going to deal with the inner-most brackets first, then combine this answer with the

Exercise: Building circuits

Draw the circuit diagrams for the following. (Remember: do we deal with AND or OR first?):

Answer:

Answer:

Answer:

Answer:

Answer:

A common question in the exam is to give you a description of a system. You'll then be asked to create a boolean statement from this description, and finally build a logic gate circuit to show this system:

Example: Building circuits

Using boolean algebra describe the following scenario:

A car alarm is set off if a window is broken or if it senses something moving inside car, and the car is not being towed, or the engine is not on.

Where:

  • A = being towed,
  • B = window broken,
  • C = engine on,
  • D = senses movement

Before you rush into answering a question like this, let's try and break it down into its components. The questioner will often be trying to trick you. The two occasions that the alarm will sound are: but there is a caveat, the alarm will sound if either of these are true AND two things are also true, namely the engine is NOT on, and the car is NOT being towed:

Combining both we get (remember the brackets!):

The next step is to create a diagram out of this:

Exercise: Building circuits

A security system allows people of two different clearance levels access to a building. Either they have low privileges and they have a card and they are not carrying a mobile. Alternatively they have a key and are allowed to carry a mobile.

The inputs available are:

  • A = carrying a card
  • B = carrying a mobile phone
  • C = carrying a key

Write down the boolean equation to express this:

Answer:

If you wrote: You'd be wrong! The reason being the text says: Alternatively they have a key and are allowed to carry a mobile. This doesn't mean , it means they can carry a mobile, or they can choose not to: , which simplifies to: .

Draw the logic gate diagram to solve this:

Answer: