GCSE COMPUTER SCIENCE NOTES
UNIT 2: Data
2.1: Binary
❖ Transistors: Tiny electronic components combined in circuits and etched onto silicon chips. A single transistor
has 2 states: high [on] and low [off].
❖ In binary these two states are represented as 1 [for on] and 0 [for off].
➢ These are called binary digits [bits].
➢ All data is represented as a pattern of bits in a computer system.
❖ The number of binary patterns that can be produced by a group of n bits is expressed as
Using binary to represent data and program instructions
❖ Font Definition: Define how a font is to be displayed on a screen.
❖ When a computer is asked to display a binary pattern as characters on the screen, it looks up the graphical
representation for it in a font definition and sends it to the screen hardware.
❖ To encode an image, each tiny picture element [pixel] is allocated its own binary pattern.
❖ All encoding systems are limited by the number of available bits.
➢ With 4 bits [a nibble], 16 colours can be assigned a unique binary pattern.
➢ With 24 bits [3 bytes], more than 16 million colours can be represented.
➢ The more bits that are used in an encoding system, the more distinct values can be represented in binary,
but the more space is required to store the binary code.
Number Systems
❖ Signed Numbers: Numbers that can be either positive or negative, indicated by its sign.
❖ Unsigned Numbers: Numbers with a non-negative value of 0 or more.
❖ A 1 byte [8 bit] unsigned integer has a range of 0 to 255, whilst a 1 byte signed integer has range of -128 to +127.
➢ Both have 256 different values, but signed numbers use ½ their range for negative values whilst unsigned
numbers have positive values that are twice as large.
➢ This is because the first column of a signed 8 bit integer will be worth -128 instead of 128.
❖ Denary system works in powers of 10, whereas the binary system uses powers of 2.
Binary System
❖ In the binary system, place values increase by powers of 2.
❖ MSB: The bit in the leftmost position. It has the highest place value.
➢ The place value of the MSB of a binary number of length n is .
❖ LSB: The bit in the rightmost position. It has the lowest place value.
➢ The place value of the LSB is always .
, ❖ There are 256 different binary patterns generated by an 8-bit binary number, meaning that it can be used to
represent positive denary integers in the range 0-255.
[2.1.3] Converting positive denary numbers to binary
[2.1.2]Two’s Complement
❖ Two's complement is used to show positive and negative
numbers.
➢ The MSB has been designed to act as the sign bit
[An MSB of 1 makes the number negative].
➢ Range: -128 [1000 0000] => +127 [0111 1111].
UNIT 2: Data
2.1: Binary
❖ Transistors: Tiny electronic components combined in circuits and etched onto silicon chips. A single transistor
has 2 states: high [on] and low [off].
❖ In binary these two states are represented as 1 [for on] and 0 [for off].
➢ These are called binary digits [bits].
➢ All data is represented as a pattern of bits in a computer system.
❖ The number of binary patterns that can be produced by a group of n bits is expressed as
Using binary to represent data and program instructions
❖ Font Definition: Define how a font is to be displayed on a screen.
❖ When a computer is asked to display a binary pattern as characters on the screen, it looks up the graphical
representation for it in a font definition and sends it to the screen hardware.
❖ To encode an image, each tiny picture element [pixel] is allocated its own binary pattern.
❖ All encoding systems are limited by the number of available bits.
➢ With 4 bits [a nibble], 16 colours can be assigned a unique binary pattern.
➢ With 24 bits [3 bytes], more than 16 million colours can be represented.
➢ The more bits that are used in an encoding system, the more distinct values can be represented in binary,
but the more space is required to store the binary code.
Number Systems
❖ Signed Numbers: Numbers that can be either positive or negative, indicated by its sign.
❖ Unsigned Numbers: Numbers with a non-negative value of 0 or more.
❖ A 1 byte [8 bit] unsigned integer has a range of 0 to 255, whilst a 1 byte signed integer has range of -128 to +127.
➢ Both have 256 different values, but signed numbers use ½ their range for negative values whilst unsigned
numbers have positive values that are twice as large.
➢ This is because the first column of a signed 8 bit integer will be worth -128 instead of 128.
❖ Denary system works in powers of 10, whereas the binary system uses powers of 2.
Binary System
❖ In the binary system, place values increase by powers of 2.
❖ MSB: The bit in the leftmost position. It has the highest place value.
➢ The place value of the MSB of a binary number of length n is .
❖ LSB: The bit in the rightmost position. It has the lowest place value.
➢ The place value of the LSB is always .
, ❖ There are 256 different binary patterns generated by an 8-bit binary number, meaning that it can be used to
represent positive denary integers in the range 0-255.
[2.1.3] Converting positive denary numbers to binary
[2.1.2]Two’s Complement
❖ Two's complement is used to show positive and negative
numbers.
➢ The MSB has been designed to act as the sign bit
[An MSB of 1 makes the number negative].
➢ Range: -128 [1000 0000] => +127 [0111 1111].