Data Representation
Number Systems WHEN
NOTE
REMINDER
ITSELF
YOUWHEN
THAT REACH
IS NOTHAS
THE0,VALUE
THE
TO BE READ
DIVISIBLE FROM
BY 2, IT IS
BOTTOMBY
DIDVDED TOTHE
TOPPREVIOUS
GIVING US THE
VALUE
OFBINARY VALUE (AS
THE CURRENT IN THISAND
NUMBER CASE, 1 IT
Binary to Hexadecimal
Binary system ISIS 10001110)
ADDED TO THE REMEINDER
COLUMN FOR THAT SPECIFIC
NUMBER
Divide the binary value into groups of 4
Base 2 number system starting from the right. If at the end, the
It has 2 values 0 ad 1 last division is less than 4, add 0s until it
0 represents OFF. reaches 4
and 1 represents ON
For each group, find the denary value and
then convert each denary value to its
corresponding hexadecimal value
Denary system After conversion, just put all the
Base 10 number system hexadecimal
Has values from 0 to 9 l values in order to get
the final answer
Hexadecimal system
Base 16 number system
Have values from 0 to 9
followed by A to F
Number Conversions
Binary to Denary
Place the binary value in columns of 2 raised to the power of the values from
the right starting from 0
E.g. for the binary value 1110110 place it I the table like this Hexadecimal to Denary
Place the hexadecimal value in columns of 16 raised to the power of the
values from the right
As can be seen it started from 1 and then it goes to 128 from
left to right
Now values with 1 are to be added together, giving the final answer e.g.
128 + 64 + 32 + 8 + 4 + 2 = 238
Denary To Binary
Take the value and divide by 2
Denary to Hexadecimal
h
Divide by 16 until the value “0” is reached
Hexadecimal To Binary
Separate each value from each other and convert them to
denary
Each separate denary value to be converted to binary
All binary values to be merged together e.g.
Binary calculations Uses of Hexadecimal System
Defining colours in HTML
MAC addresses
Overflow
When adding 2 values, if solution
exceeds the
limit of given values Text, Sound and Images
e.g. value cannot fit into 8-bit digit
register
ASCII (a character set and was an accepted standard for information
or interchange
When the value is larger than 255 It consists of 7-bit codes (0 to 127 in denary or 00 to 7F
hexadecimal)
that represent the letters, numbers and characters found on a
standard keyboard, together with 32 control code
Uppercase and lowercase characters have different values
ASCII uses one byte to store the value
When the ASCII value of a character is converted to binary, it can
be seen that the sixth-bit changes from 1 to 0 when going when
going from lowercase to uppercase, and the rest remains the same
Unicode
It is an exaple of a character set and was created as a solution to the
limitations of ASCII
Uses a minimum of 16 bits
Can represent characters from all the major languages around the world
Unicode supports up to 4 bytes per charcter, storing multiple languages
and more data
Logical To represent text in binary, a computer uses a character seet, a collection
Shifts of characters and the corresponding that represent them
Preforms multiplication and division
Left shift multiplies a binary number by 2
Right shift divides a binary number by 2
ASCII UNICODE
Number of bits
Shift 00010101 two times to the left Number of charcters
01010100 Uses
Benefits • It can
represent
more
characters • It
can represent
emojis/symbol
Two’s complement s
• It can
Method of using signed binary value to represent
Represent negative number more
Convert – 79 languages
Drawbacks
- 64 32 16 8 4 2 1
128
1 0 1 1 0 0 0 2
01001111 Write + number
10110000 Invert binary digits
+1 Add 1
-79 = 10110001 Giving you negative number