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?
- Computers are electrical devices.
- Computers process data by using electricity through wires and transistors.
- Transistors are electrical switches.
- The wires and transistors are inside the central processing unit and other parts.
- The presence of electricity means a 1.
- The absence of electricity means a 0.

The transistor
- Transistors are electrical parts made from semiconductor materials.
- The materials can act as electrically-controlled switches.
- Transistors can be used to briefly store data.
- For example, transistors store data in some forms of primary storage (memory).

Transistors in the CPU
- Transistors are inside a Central Processing Unit (CPU).
- Transistors are arranged into circuits.
- For example, transistors can form an 'adder' circuit that accepts two binary numbers.
- The adder circuit gives the sum of the two numbers.
- Modern CPUs contain over 3 billion transistors.
- Transistors let CPUs do billions of calculations per second.
Logic Circuits
Many transistors can be put together to make logic gates and logic circuits.

Logic gates
- Many transistors can be put together to form more complex "switches".
- Switches only allow electricity to flow through.
- Electricity only flows if all or some of the transistors are "on".
- Arrangements of transistors are called logic gates.

Examples of logic gates
- The AND gate performs the boolean AND function.
- The AND gate will only output true if both of its inputs are true.
- The OR gate performs the boolean OR function.
- The OR gate will output true if either or both of its inputs are true.
- The NOT gate performs the boolean NOT function.
- The NOT gate takes one input and inverts it.

Logic circuits
- Logic gates can be joined to make complex logic circuits.
- Logic circuits can do tasks 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?