02 Section 7 - Logic and Units Flashcards
What do logic gates do?
Logic gates apply Boolean operations to inputs
-they receive binary data, apply a Boolean operation, then output a binary result
What are logic gates?
Logic gates are special circuits built into computer chips
What is a truth table?
Each type of logic gate has a corresponding truth table
-truth tables show all possible input combinations of 1s and 0s, and the corresponding outputs
What is a NOT gate?
NOT gates take a single input and give a single output
-the output is always opposite to the input (e.g. input: 0, output: 1)
What is the symbol for a NOT gate?
A triangle with a circle on the point
What is an AND gate?
AND gates take two inputs and give one output
-if both inputs are 1 then the output is 1, otherwise the output is 0
What is the symbol for an AND gate?
It looks like a ‘D’
What is an OR gate?
OR gates take two inputs and give one output
-if one or more outputs are 1 then the output is 1, otherwise the output is 0
What is the symbol for an OR gate?
It looks like an altered D, so the back is concave and the round part of a D comes to a point
What is the expression and notation for a NOT gate?
Expression: NOT A
Notation: ¬
What is the expression and notation for an AND gate?
Expression: A AND B
Notation: A ∧ B
What is the expression and notation for an OR gate?
Expression: A OR B
Notation: A V B
How do you work out combined logic gates?
-work through each gate in order, follow through each gate and work out the final output
How can logic gates be written as logic statements?
USE BRACKETS and the terms AND, OR, NOT
- e.g. NOT(A AND B)
- operations in the brackets should be completed first
What is a two-level logic circuit?
They require a maximum of two logic gates to reach the output
-they can have 3 inputs though
What does the word ‘bit’ come from?
bit - binary digit
List the units of data in size order, starting from the smallest:
Bit (b) Nibble Byte (B) Kilobyte (kB) Megabyte (MB) Gigabyte (GB) Terabyte (TB) Petabyte (PB)
How big is a bit?
a single binary digit
How big is a nibble?
4 bits
How big is a byte?
8 bits
How big is a kilobyte?
1000 bytes
How big is a megabyte?
1000 kilobytes
How big is a gigabyte?
1000 megabytes
How big is a terabyte?
1000 gigabytes
How big is a petabyte?
1000 terabytes
A byte is enough space to store what?
one character
A kB or MB is enough space to store what?
most files (like songs, pictures and documents)
A GB is enough space to store what?
High definition videos and complex applications
A GB or TB is enough space to store what?
Secondary storage
What are Parity Bits used for?
Parity Bits are used to check for errors
What are check digits?
Check digits are a way of checking that data has been entered and read correctly.
What is an example of a check digit?
ISBNs on books
For binary, what is the check digit called?
parity bit, you can have even and odd parity bits
How do you get an even parity bit?
An even parity bit is added to make a binary string have an even number of 1s
How do you get an odd parity bit?
An odd parity bit is added to make a binary string have an odd number of 1s
What is the flaw in having an odd or even parity bit?
- if one bit of the binary string is read incorrectly then the computer will pick up the error
- however if two bits within the same string are read incorrectly then no error will be detected