Binary
Binary
Size Unit
So, the value of the number 124 in denary place values is actually:
R/ 0 0 1 2 4
Binary to denary
Binary has just two units, 0 and 1. The value of each binary place value is
calculated by multiplying the previous place value by two. The first eight
binary place values are:
128 64 32 16 8 4 2 1
To convert binary to denary, simply take each place value that has a 1, and
add them together.
128 64 32 16 8 4 2 1
0 1 1 1 1 1 0 0
Denary to binary
128 64 32 16 8 4 2 1
64 is the biggest place value that can be subtracted from 84. Place a 1 in
the 64-place value column and subtract 64 from 84, which gives 20.
128 64 32 16 8 4 2 1
16 is the biggest place value that can be subtracted from 20. Place a 1 in
the 16-place value column and subtract 16 from 20, which gives 4.
128 64 32 16 8 4 2 1
1 1
4 is the biggest place value that can be subtracted from 4. Place a 1 in the
4-place value column and subtract 4 from 4, which gives 0.
128 64 32 16 8 4 2 1
1 1 1
128 64 32 16 8 4 2 1
0 1 0 1 0 1 0 0
Binary addition
When two numbers are added together in denary, we take the first number,
add the second number to it, and get an answer. For example, 1 + 2 = 3.
There are four rules that need to be followed when adding two binary
numbers. These are:
0 + 0 = 0
1 + 0 = 1
Example - adding 01 + 10
1 + 0 = 1
0 + 1 = 1
1 + 1 = 0, carry 1
1 + 0 + 0 = 1
0 + 1 = 1
Result in binary: 110 (which is denary 6)
1 + 0 = 1
1 + 1 = 0, carry 1
1 + 0 + 1 = 0, carry 1
1 + 0 + 0 = 1
1 + 1 = 0, carry 1
1 + 0 + 1 = 0, carry 1
1 + 1 + 1 = 1, carry 1
1 + 0 + 0 = 1
Result in binary: 11001001 (which is denary 201). You can check your
answers by converting each binary number into denary and checking your
addition. In this example, 01010011 is 83 in denary and 01110110 is 118 in
denary. So, 83 + 118 is 201.
Overflow
Overflow occurs when the result of a calculation requires more bits (place
values) than are in the available range.
For example, when using eight bits, the largest number that can be recorded
is 11111111 (denary 255). When adding together two eight-bit numbers, a
situation may occur when the result requires more than eight bits to hold it.
For example, adding the binary numbers 11111110 (denary 254) and
00000010 (denary 2) would give:
The result is 10000000 (denary 256), which requires nine bits. However, as
only eight bits are available to hold the number, the result would be
00000000 (denary 0).
As you can see, overflow can have serious consequences for the validity of
calculations.
Consider a simple black and white image. If 1 is black (or on) and 0 is white
(or off), then a simple black and white picture can be created using binary.
To create the picture, a grid can be set out and the squares, known as
pixels, coloured (0 - black and 1 - white):
Colour depth
Many images need to use colours. To add colour, more bits are required for
each pixel. The number of bits determines the range of colours. This is known
as an image's colour depth.
For example, using a colour depth of two, ie two bits per pixel, would allow
four possible colours, such as:
00 - black
01 - dark grey
10 - light grey
11 - white
Each extra bit doubles the range of colours that are available:
16 bits per pixel (0000 0000 0000 0000 to 1111 1111 1111 1111) - over
65,000 possible colours
The more colours an image requires, the more bits per pixel are needed.
Therefore, the more the colour depth, the larger the image file will be.
Image size
256 × 256
640 × 480
1024 × 764
Result: 160KB
Resolution
In a low-resolution image, the pixels are larger and therefore, fewer are
needed to fill the space. This results in images that look blocky or pixelated.
An image with a high resolution has more pixels, so it looks a lot better
when it is enlarged or stretched. The higher the resolution of an image, the
larger its file size will be.
Metadata
Files contain extra data called metadata. Metadata includes data about the
file itself, such as:
file type
date created
author
An image file also includes metadata about the image data itself, such as:
the height and width of the image - this defines how many rows and columns
the pixels are to be arranged in
the resolution
Without this metadata, the image data would not be correctly interpreted,
meaning the image could not be correctly displayed.
Answer
Answer
Answer