Save
Computer Science ALevel
Data Representation
Save
Share
Learn
Content
Leaderboard
Learn
Created by
Oliver Perry
Visit profile
Cards (25)
Natural Numbers are
positive integers
Integers are
whole numbers
rational numbers are numbers that can be expressed with
fractions
and
ratios
irrational numbers cannot be expressed with a
fraction
, such as
Pi
Real numbers are both
rational
and
irrational
binary is base
2
decimal is base
10
hexadecimal is base
16
computers
are made up of millions of switches that turn on and off
a bit
is the smallest unit of data
a byte
is 8 bits
ASCII is made to represent the
English alphabet
using
7
bits
Unicode uses
8
bits, it also represents characters from
multiple languages
transmission errors:
electrical interference
,
power surges
,
synchronisation issues
,
wear and tear in cables
some ways to check for errors include:
parity bits
,
majority voting
,
check digits
, and
checksums
Parity Bits
computers are either odd or even parity
when sending a byte, one bit is the parity bit
they can only check for errors and not correct them
Majority Voting
each bit is sent three times
if any bits are flipped, the receiving computer uses majority rule to fix it
errors can sometimes get through if there is a majority
Check Digits
a check digit is an additional digit at the end of a long line of numbers
Checksums
a total sum of all bytes id calculated
the sum is often sent with the data
an
overflow
error is when the carried bit exceeds the byte
negative numbers are represented with
twos compliment
, where 11111111 is
-1
to find the compliment of a number you:
flip it
add 1
e.g. 01001101 =77 > 10110010 = - 76 > 10110011 = -77
you can use
twos compliment
to do subtraction
to do fractions you add a point in the
middle of the byte.
The left is the
number
and the right is the
decimal
starting at 2^-1, then 2^-2, and so on
floating point uses 16 bits. 1 for the sign, 9 for the number, 6 for the exponent. rounding is necessary