# Binary Conversion

I found a great little site that does binary conversion, “well so does my one pound calculator” I hear you say, well this also shows mantissa and exponent in floating point. Give it a shot.

# Calculations in computer systems

I was sure I had this here already but I can’t find it.

Here are the main formula we used in the computer systems unit

• Largest number with n bits = 2n-1
• No of memory locations/different colours = 2n
• Coloumn heading in a binary number at n bit =2n-1
• Size of bitmap = no. of Horizontal pixels X no. of Vertical pixels X Colour Depth
• No. of pixels = DPI X size in inches
• Total storage capacity = no. of memory locations X location size.

You should also be able to convert from bits, Bytes, Kilobytes, Megabytes, Gigabytes & Terabytes.

• Bit= 1/0 (Binary digIT)
• 1 Byte = 8 Bits
• 1 Kilobytes= 1024 Bytes  (210)
• 1 Megabytes= 1024 KB  (220)
• 1 Gigabytes = 1024 MB  (230)
• 1 Terabytes = 1024 GB  (240)

For colour depth

• 8 bits = 256 colours (28)
• 16 bits = High Colour 65,536 colours (216)
• 24 bits = True Colour 16,777,216 colours (224)

# Binary & 2’s Complement Revision

You can find the new powerpoint here.

I will embed the flash file in this post in due course, at the moment it doesn’t want to play ball.

# Homework for Thursday 1st Dec

Convert the following to decimal

1. 11111100 (2’s comp)
2. 00110110
3. 11111111 (2’s comp)

How many pixels in the following files

1. 320×240 @ 8 bits/pixel
2. 1024×768 @ 16 bit colour depth
3. 1280×1024 @ 24bpp

What are the sizes of the following files in bytes

1. 320×240 @ 8 bits/pixel
2. 1024×768 @ 16 bit colour depth
3. 1280×1024 @ 24bpp

Calculate the storage requirements for the following images in Megabytes (to 2 decimal places)

1. 1440×1080 @ 24 bpp
2. 1920×1080 @ 24 bpp
3. 7689×4320 @ 24 bpp

# Binary a review in slides

OK so here is what we have covered so far.

# Binary 2’s Complement

I posted on this last year, I don’t feel the need to go back over it. However, if you would like me to give another full post please just ask.

Remember for 8 bit 2’s complement the column headers are -128 64 32 16 8 4 2 1

The homework for tonight is to convert the following to binary using 2’s complement, the answers should be in Bytes so either 8 or 16 bits.

1. 397
2. -45
3. 128
4. -120
5. -13
6. 0
7. 1013
8. -92
9. -100
10. -3

Have fun

# Binary Numbers

Computers store all data as binary, numbers are easily stored this way.

Humans work with a base 10 numbering system (we have 10 fingers), however computers can only store data using electricity (on and off) which is base 2.