Preskoči na glavni sadržaj
Prijava
Sign up for FREE
arrow_back
Biblioteka

Y10 - Topic 1: Data Representation- Binary numeric base

star
star
star
star
star
Posljednje ažuriranje 5 months ago
21

he two number systems we will discuss in this section are denary and binary.

The base of a number system describes how many symbols (agreed shapes) there are in that system. Therefore denary has ten symbols, and binary has two symbols.

There are others as well, for example hexadecimal which has sixteen symbols.

Base 10 number system (denary)

In our everyday lives we use a denary number system which has the number symbols 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.

This is called a base-10 number system, because there are ten symbols involved.

Here are some examples of denary numbers: 2, 25, 346, 1374, 33807

Obavezno
0
Pitanje 1
1.

The numbers given as examples are all in denary. What makes them different?

Base 2 number system (binary)

You already know that computers need to use binary numbers to process data.

Binary is a base-2 type of number which has only two symbols, and these are chosen to be 1 or a 0

Here are some examples of binary numbers:

  • 1

  • 101

  • 1101

  • 11011001

Obavezno
1
Pitanje 2
2.

How many digits are available to us in binary base?

Denary number position and value

When working with any number system, the position of the digit or symbol is important in order to be able to calculate its value.

Let's look at the denary number 123.

The number on the far right, 3, is worth 3. But the number to the left of 3 isn't worth 2. Instead, it is worth 20. Because its position is one to the left of 3, it has been multiplied by 10, so it is (10 x 2).

Now think about the number 1 in 123. Again, this isn't worth the value of 1, instead it is multiplied by 100 because it is two to the left. Its actual value is (100 * 1)

The value of the decimal number 123 is arrived at by using the following calculation:

(3 x 1) + (10 x 2) + (100 x 1).

The following table shows the value of a "1" digit, depending on its position within a denary number:

Binary number position and value

Just like the denary system, the position of a digit in a binary number determines its actual value and just like denary, a binary number reads from right to left.

In the binary system the rule is that each time you move one position left, the value of a digit is multiplied by a power of 2, with the power being its position. So a digit in position 4 is multiplied by 24

The following table shows the value of a "1" digit, depending on its position within a binary number.

Obavezno
1
Pitanje 3
3.

Which position is the 'least significant' position?

Obavezno
1
Pitanje 4
4.

Which position is the 'most significant' position?

Obavezno
1
Obavezno
1
Obavezno
1
Obavezno
1
Obavezno
1
Obavezno
1
Obavezno
1
Obavezno
1
Obavezno
1
Obavezno
1
Obavezno
1
Obavezno
1
Obavezno
1
Obavezno
1
Obavezno
1
Obavezno
1

Bit is the smallest data unit in computer systems.

A bit can hold either a 0 or a 1.

Now, we are going to learn more about data storage units.

Log into teach-ict.com

username: almeria

password: program5

Go to the following lesson:

Units of Storage

Read through the theory, and then start working on the worksheets given to you.

Obavezno
1
Pitanje 21
21.

Bit is a shortened form of a two-word term. Do you know what that it?

Calculating the value of binary numbers

Binary to Denary conversion

Example 1: What is the value of the binary number 00100101 ?

Answer: the number 00100101 represents 'thirty seven'.

Working from the right: (1x1) + (2x0) + (4x0) + (8 x 0) + (16x0) + (64x0) + (128x0) = 37

Example 2: What is the value of the binary number 11111111 ?

Answer: the number 11111111 represents 'two hundred and fifty five'. This is the largest number that can be represented with an 8 bit binary number i.e. a byte.

Working from the right: (1x1) + (2x1) + (4x1) + (8 x 1) + (16x1) + (64x1) + (128x1) = 255

Pitanje 5
5.

Calculate the denary value of binary number : 00001101

Pitanje 6
6.

Calculate the denary value of binary number : 00101101

Pitanje 7
7.

Calculate the denary value of binary number : 01101011

Pitanje 8
8.

Calculate the denary value of binary number : 10001000

Pitanje 9
9.

Calculate the denary value of binary number : 10011001

Pitanje 10
10.

Calculate the denary value of binary number : 11100111

Pitanje 11
11.

Calculate the denary value of binary number : 100001100

Pitanje 12
12.

Calculate the denary value of binary number : 110000101

Denary to binary conversion

On the previous page we saw how a binary number has a value depending on the arrangement of 1s and 0s in the number.

It should be apparent that the same number can be represented in the denary system as well.

We shall now describe a method of converting any denary number from 0 to 255 into its equivalent binary number.

We will be using denary number 211 in our example

Step 1.

Start off with the table below that has all zeros in the second row.

Step 2.

Is 211 larger than 128?

If yes, put a 1 underneath the 128 in the table. If not, leave it at 0.

Step 3.

As we put a 1 under 128, subtract 128 from 211 to see what is left:

211 - 128 = 83

Step 4.

We have 83 left

Is 83 larger than 64? If yes, put a 1 in the space under 64, if not, leave it at 0.

Step 5.

We started with 83 and we put a 1 under 64. Thus, subtract 64 from 83 to see what is left:

83 - 64 = 19

Step 6.

We have 19 left.

Is 19 larger than 32? If yes, put a 1 in the space under 32, if not, leave it at 0.

Step 7.

As 19 was NOT larger than 32, we left it at 0.

Is 19 larger than 16? If yes, put a 1 in the space under 16, if not, leave it at 0.

Step 8.

We started with 19 and we put a 1 under 16. Thus, subtract 16 from 19 to see what is left:

19 - 16 = 3

Step 9.

We have 3 left.

Is 3 larger than 8? If yes, put a 1 in the space under 8, if not, leave it at 0.

Step 10.

As 3 was NOT larger than 8, we left it at 0.

Is 3 larger than 4? If yes, put a 1 in the space under 4, if not, leave it at 0.

Step 11.

As 3 was NOT larger than 4, we left it at 0.

Is 3 larger than 2? If yes, put a 1 in the space under 2, if not, leave it at 0.

Step 12.

We started with 3 and we put a 1 under 2. Thus, subtract 2 from 3 to see what is left:

3 - 2 = 1

Step 13.

Is there a 1 left over? If yes, place a 1 in the space under 1, if not leave it at 0.

There was a 1 left over and so a 1 was placed in the last position.

ANSWER:

Using the method above, the denary number has been converted to its equivalent binary: 11010011

Pitanje 13
13.

Convert the denary number 23 to binary.

Pitanje 14
14.

Convert the denary number 77 to binary.

Pitanje 15
15.

Convert the denary number 100 to binary.

Pitanje 16
16.

Convert the denary number 145 to binary.

Pitanje 17
17.

Convert the denary number 202 to binary.

Pitanje 18
18.

Convert the denary number 129 to binary.

Pitanje 19
19.

Convert the denary number 263 to binary.

Pitanje 20
20.

Convert the denary number 511 to binary.