Convert the following to Binary using 2’s Complement.

Continue reading Binary H/W 21/8

# Tag Archives: Binary

# 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 = 2
^{n}-1 - No of memory locations/different colours = 2
^{n} - Coloumn heading in a binary number at n bit =2
^{n-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 (2
^{10}) - 1 Megabytes= 1024 KB (2
^{20}) - 1 Gigabytes = 1024 MB (2
^{30}) - 1 Terabytes = 1024 GB (2
^{40})

For colour depth

- 8 bits = 256 colours (2
^{8}) - 16 bits = High Colour 65,536 colours (2
^{16}) - 24 bits = True Colour 16,777,216 colours (2
^{24})

# 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

Answer the following questions.

Convert the following to decimal

- 11111100 (2’s comp)
- 00110110
- 11111111 (2’s comp)

How many pixels in the following files

- 320×240 @ 8 bits/pixel
- 1024×768 @ 16 bit colour depth
- 1280×1024 @ 24bpp

What are the sizes of the following files in bytes

- 320×240 @ 8 bits/pixel
- 1024×768 @ 16 bit colour depth
- 1280×1024 @ 24bpp

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

- 1440×1080 @ 24 bpp
- 1920×1080 @ 24 bpp
- 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.

- 397
- -45
- 128
- -120
- -13
- 0
- 1013
- -92
- -100
- -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.

This article explains binary in a simple way

128 64 32 16 8 4 2 1 are the headings at the top of the binary numbers so 10001000 would be 128+8 which is 136

Practice here before attempting some bingo

For you exams you will be required to show the working for binary conversion, however, you can check this by using a calculator that has a binary function. The calculator below was found in a local pound shop, you can check if your calculator has binary by checking the buttons for BIN, OCT, DEC, HEX.

You can make a little Binary Calculator with the attached file. The photographs show it in action, simply fold the flaps to make the binary number and add the numbers shown. (teachers note that for 2’s complement just change +128 to -128)