0% found this document useful (0 votes)
10 views6 pages

Computers

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views6 pages

Computers

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Number systems

Binary system.
It is based on the number 2. Only two values ‘0’ and ‘1’ can be used in
this system.
Denary system
It is based on the number 10. The values 0-9 are used in this system.
Hexadecimal system
It is a base 16 system. It uses 16 digits – 0 to 9 and A to F.

Conversions
Binary to Denary – Table
Denary to Binary – Table
Binary to Hexadecimal – Create groups of four. Add the digits in each
group. Assign a hex value to each group.
Hexadecimal to Binary – Write the binary value for each hexadecimal
character.
Eg., B is 13, which in binary is 1101
Denary to Hexadecimal – Convert Decimal to Binary. Then convert
binary to Hexadecimal.
Hexadecimal to denary – Convert Hexadecimal to Binary. Then convert
binary to Denary.

Uses of Hexadecimal system


Hexadecimal is more convenient because one hex digit represents four
binary digits. So, it’s more convenient to use.
Eg. The binary 1101001010101111 can be simply written as D2AF

The hex system is used for


1. Error codes 2.MAC addresses 3. IP addresses 4. HTML
colour codes
Error codes – this number refers to the memory location of the error. It
is automatically generated by the computer.
Media Access Control (MAC) addresses – this number refers to a
number that uniquely identifies a device on a network.
Eg. 00 – 1C – B3 – 4F – 25 – FE
The first half of the number is the identity number of the manufacturer
The second half of the number is the serial number of the device

A MAC address is a 48-bit number

Internet Protocol (IP) addresses


IP address is a 32-bit number written in denary form eg. 109.108.158.1
or in hexadecimal form 77.76.9e.01

HTML colour codes


Different colours are represented by different hexadecimal values.
Eg. # FF 00 00 represents primary colour red
# 00 FF 00 represents primary colour green
# 00 00 FF represents primary colour blue

# symbol is always used before the hexadecimal value


The colour codes are always six digits representing red, green and blue
Red has 256 possible values, blue has 256 possible values and green
has 256 possible values. So the total number of colours possible are 256
x 256 x 256 (16 777 216)
Overflow
The maximum denary value that a 8-bit register allows is 255 (2 – 1)
The maximum denary value that a 16-bit register allows is 2 – 1
The maximum denary value that a 32-bit register allows is 2 – 1
When a number is too big to be stored in 8-bit register, a 9th bit is
generated causing an overflow error.

Logical binary shifts


Left logical shift: In a logical binary shift to the left, each shift is
equivalent to multiplying the number by 2. So two shifts to the left is
equal to multiplying the number by 4, and three shifts to the left is equal
to multiplying the number by 8 and so on.
In Left shift, the left most bit is called the Most Significant Bit
Right logical shift: In a logical binary shift to the right, each shift is
equivalent to dividing the number by 2. So two shifts to the right is equal
to dividing the number by 4, and three shifts to the right is equal to
dividing the number by 8 and so on.
In right shift, the right most bit is called the Least Significant Bit

Two’s complement
Two’s complement is used to allow the possibility of representing
negative numbers.

In two’s complement, the value of 128 is changed to -128. Everything


else remains the same.
The left-most bit determines whether the number is negative or positive.
If the left-most bit has a 1-value, the number is negative.
If the left-most bit has a 0-value, the number is positive.
Eg: -128 is 10000000 and +127 is 011111111
How to convert a negative number into a binary number in two’s
complement form.
Write the 8-bit box
Mark the left most bit as -128
Find the difference between 128 and the given number (eg -67)
Write the binary for the answer (eg 61)

If a binary digit is given, flip the table (1s become 0s and 0s become 1s).
Now calculate the values using the binary to denary conversion method.
Don’t’ forget to assign negative value to the left most digit.

ASCII code and Unicode


ASCII uses 7-bit codes
Extended ASCII uses 8-bit codes
The main disadvantage of ASCII code is it does not represent non-
western languages
A new code called UNICODE represents all languages

TEXT, SOUND AND IMAGE


SOUND
The number of bits per sample is called Sampling Resolution (bit-depth)

IMAGE
DATA STORAGE AND FILE COMPRESSION
A bit is a basic unit of computing.
It is either 1 or 0

A byte is the smallest unit of memory


8 bits make one bite.

A 4-bit number is called a nibble.

CALCULATION OF FILE SIZE


Size of image
Multiply image resolution x colour depth
Then divide to 8 to convert it into bytes
Divide by 1024 x 1024 to convert to Mibibytes

Size of sound sample for mono sound


Sample Rate x sample resolution x length of sample (in seconds)
For stereo sound multiply this into 2
Lossy file compression – some loss in detail compared to original file. Eg
JPEG, MP3, MP4
Lossless file compression – all data from compressed file can be
restored to original condition. No loss of data. Eg. RLE (Run-Length
Encoding)

You might also like