Presentation is loading. Please wait.

Presentation is loading. Please wait.

Binary.

Similar presentations


Presentation on theme: "Binary."— Presentation transcript:

1 Binary

2

3 Binary digit = a Bit All Computers store programs and data as binary, therefore all data that is input into a computer must be converted into binary (machine code) before it can be processed by the computer. Bit is a single binary unit or 1 is stored. (off or on) A byte is a collection of 8 bits so therefore a combination of eight 0’s or 1’s combine for a byte. E.g A nibble is 4 bits, e.g. 0111

4 Denary We are used to counting in denary which allows the range 0-9
The table below demonstrates how a byte binary number represents a denary value. Denary Binary Data 128 64 32 16 8 4 2 1 7 60 129 140 151 166 255

5 Converting denary to binary
As stated earlier for the computer to understand the data it must convert the denary to a binary value. Example Converting 47 to binary. Hint: work from the left. 128 64 32 16 8 4 2 1 = 47

6 Converting denary to binary
Convert the following denary values to binary: 1. 27 128 64 32 16 8 4 2 1 2. 38 3. 165

7 Converting denary to binary
1. What is the largest denary value you can make in binary? 128 64 32 16 8 4 2 1

8 The largest value that may be stored in a Byte (8 bits) is shown below
128 64 32 16 8 4 2 1 255

9 Converting binary to denary.
Convert the following binary values to denary: 128 64 32 16 8 4 2 1

10 Adding binary Adding binary example. Notes: 0 + 0 = 0 1 + 0 = 1
1 Notes: 0 + 0 = 0 1 + 0 = 1 1 + 1 = 10 so write 0 carry 1. binary 1 + binary 1 = binary 2. = 11 so write 1 carry 1. binary 1 + binary 1 + binary 1= binary 3.

11 Adding binary – attempt the following
Attempt the following binary addition. (9+5) 1 Attempt the following binary addition. (7+5) 1

12 Adding binary – attempt the following
Attempt the following binary addition. (9+5) 1 Attempt the following binary addition. (7+5) 1

13 Overflow error When dealing with a byte (8 bits) the largest number we can store is 255. If we add two numbers that combine for a total of more than 255 then an overflow error would occur in this case. E.g = This could not be stored in binary within a byte. Overflow 128 64 32 16 8 4 2 1 200 178+

14 Overflow Overflow 128 64 32 16 8 4 2 1 The overflow digit cannot be stored so the answer becomes = 122! Overflow errors happen when the largest number that a register can hold is exceeded. The number of bits that it can handle is called the word size. Most CPUs use a much bigger word size than 8 bits. Many PCs have a 64-bit CPU. A 64-bit CPU can handle numbers larger than 18 quintillion (18,446,744,073,709,551,615 to be precise).

15 Past Paper Questions

16 Past Paper Questions

17 Past Paper Questions


Download ppt "Binary."

Similar presentations


Ads by Google