Titlebar
Home FAQ and Resources 2.1.1 Fundamentals

2.1.2 Hardware

2.1.3 Software 2.1.4 Data 2.1.5 Databases 2.1.6 Comms & networks 2.1.7 Programming


 

2.1.2 Computer hardware


a) Purpose of the CPU

b) Function of the CPU

c) CPU characteristics

d) Binary

e) Logic diagrams

f) Truth tables

g) RAM v ROM

h) ROM

i) RAM

j) RAM and performance

k) Virtual memory

l) Cache

m) Flash memory

n) Memory technologies

o) The need for I/O devices

p) Input devices

q) Output devices

r) I/O and specific needs

s) Secondary storage

t) Common technologies

u) Suitable storage devices



 





2.1.2 f) Truth tables from logic diagrams

Introduction
We saw in the last section how logic gates work and how to represent them on paper. Now we can start to putting the logic gates together, to build complex logic diagrams. We can also see how truth tables are an invaluable tool when trying to understand what a logic diagram does.

Example 1
Consider this logic diagram:

AND NOT

What is the output? The output from the AND gate is true when both A and B are true. Otherwise, the output is false. This then feeds into the NOT gate. If the input into the NOT gate is false, the output C is true. If the input to the NOT gate is true, the output C is false.

Now this is starting to get complicated and we only have two logic gates. Imaging if we had hundreds connected together! This is where truth tables become invaluable. Rather than trying to work out what is going on in a logic diagram in one go, and trying to keep track of what is happening in our heads, we can use logic diagrams to help, working out the logic at each stage in the diagram.

AND NOT

First of all, we work out the output for the AND gate from the combinations of inputs. We create a column for the results. We feed these results into our NOT gate, producing yet another column for these results. We now have a complete truth table, which we can use to predict the output for any combination of inputs.

Example 2
Consider this logic diagram:

NOT NOT AND

What is the final output, C? We could try to work it out in our heads, although it is easy to get quickly confused. It would be better to produce a truth table of the diagram. That way, we can consider each part of the diagram in steps.

NOt NOT AND

We can look at Input A and then do NOT A. We can then look at Input B and do NOT B. We can then use the columns for NOT A and NOT B to do the AND gate. This is the final output for this logic diagram.

Example 3
Consider this more complex logic diagram:

XOR

Trying to work out what will happen for all of the different permutations without using a truth table who be difficult. When you do use a truth table, however, it becomes a lot easier. Notice this time, however, that both Input A and Input B are fed into two different logic gates at the start of the diagram on the left. It doesn't make any difference to producing the truth table. We just do the logic for each gate in turn as before.

AONATT

Example 4
Consider this even more complex logic diagram:

XOR

By using truth tables, we can see what the output is for every permutation of inputs:

XOR

You may have noticed that in Example 3 and Example 4, the outputs were the same for whatever combination of inputs was fed in. The difference here is what logic gates were used to create the logic diagram. It is entirely possible to create the same outputs for the given inputs by using different combinations of logic gates.

Q1. Draw the truth table for this diagram:

Q1

Q2. Draw the truth table for this diagram:

Q2

Q3. Draw the truth table for this diagram:

Q3

 
 

 

V1.0 Copyright theteacher.info Ltd 2011