Computational Logic

Computer Science: Cambridge International GCSE, topic 1.3.6

Binary Systems

Computer systems store and process data as binary digits.

Why use binary form?

Why use binary form?

  • Underneath the surface computers are electrical devices that process information by controlling the flow of electricity through billions of wires and transistors (electrical switches) inside the central processing unit and other components.
  • The presence of electricity represents a 1, and an absence of electricity represents a 0.
The transistor

The transistor

  • Transistors are electrical components made from semiconductor materials that can act as electrically-controlled switches.
  • Transistors can be used to temporarily store data, for example in some forms of primary storage (memory).
Transistors in the CPU

Transistors in the CPU

  • Inside a Central Processing Unit (CPU), transistors are arranged into circuits to perform operations such as calculations when electricity is passed through them.
  • For example, transistors can be arranged to form an 'adder' circuit that can accept two binary numbers, and output the sum of their values.
  • Modern CPUs contain over 3 billion transistors, allowing them to perform billions of calculations per second.

Logic Circuits

Multiple transistors can be arranged together to make logic gates and logic circuits.

Logic gates

Logic gates

  • Multiple transistors can be arranged together to form more complex "switches" that only allow electricity to flow through if all or some of the transistors are "on".
  • These arrangements are called logic gates.
Examples of logic gates

Examples of logic gates

  • The AND gate performs the boolean AND function:
  • It will only output true if both of its inputs are true.
  • The OR gate performs the boolean OR function:
  • It will output true if either or both of its inputs are true.
  • The NOT gate performs the boolean NOT function:
  • It takes one input and inverts it.
Logic circuits

Logic circuits

  • Logic gates can be combined to create complex logic circuits.
  • These logic circuits can perform functions such as adding numbers and storing data.

Test yourself on Computational Logic

  • What represents a 1 in most modern computers?

  • Logic gates are commonly created to perform what kind of function?

Practise this topic for free