Representing and manipulating data in computers
Representing and manipulating data in computers

Start this free course now. Just create an account and sign in. Enrol and complete the course for a free statement of participation or digital badge if available.

Free course

Representing and manipulating data in computers

8.6 Summary

The logic operations introduced here are summarised in Table 1, which is an example of what is known as a ‘truth table’. It shows what the result (‘output’) of each logic operation is for all possible combinations of ‘input’ values. You may find this format a useful one for remembering the various logic operations.

Table 1: Summary of the logic operations NOT, AND, OR and XOR

OperationInputsOutput
NOT01
10
AND000
010
100
111
OR000
011
101
111
XOR000
011
101
110

Activity 28 (Self assessment)

  1. If A = 0011 0111 and B = 0100 1011, find

    1. NOT A

    2. A AND B

    3. A OR B

    4. A XOR B

  2.  

    1. Is A AND B=B AND A?

    2. Is A OR B=B OR A?

    3. Is A XOR B=B XOR A?

Answer

  1.  

    1. NOT A is the complement of A, which is 1100 1000.

      So A AND B is 0000 0011.

    2. So A OR B is 0111 1111.

    3. So A XOR B is 0111 1100.

  2.  

    1. Yes

    2. Yes

    3. Yes

T224_2

Take your learning further

Making the decision to study can be a big step, which is why you'll want a trusted University. The Open University has 50 years’ experience delivering flexible learning and 170,000 students are studying with us right now. Take a look at all Open University courses.

If you are new to University-level study, we offer two introductory routes to our qualifications. You could either choose to start with an Access module, or a module which allows you to count your previous learning towards an Open University qualification. Read our guide on Where to take your learning next for more information.

Not ready for formal University study? Then browse over 1000 free courses on OpenLearn and sign up to our newsletter to hear about new free courses as they are released.

Every year, thousands of students decide to study with The Open University. With over 120 qualifications, we’ve got the right course for you.

Request an Open University prospectus371