0% found this document useful (0 votes)
1 views25 pages

Number Systems

Chapter 1 of the 11th-grade computer science syllabus focuses on number systems, including binary, octal, decimal, and hexadecimal. It covers their definitions, conversions, and operations, emphasizing the importance of understanding binary for computer hardware design. The chapter also discusses the differences between positional and non-positional number systems, along with methods for converting between these systems.

Uploaded by

novak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views25 pages

Number Systems

Chapter 1 of the 11th-grade computer science syllabus focuses on number systems, including binary, octal, decimal, and hexadecimal. It covers their definitions, conversions, and operations, emphasizing the importance of understanding binary for computer hardware design. The chapter also discusses the differences between positional and non-positional number systems, along with methods for converting between these systems.

Uploaded by

novak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Chapter 1: Number Systems

The first chapter of the 11th-grade computer science syllabus is number systems. This
chapter covers the use of numbers in computer hardware and hardware design.

Number Types

• Binary Numbers: Essential for computers, saved in 1s and 0s.

• Octal Numbers: Another type of number system.

• Decimal Numbers: Everyday numbers with symbols from 0 to 9.

• Hexadecimal Numbers: Yet another number system.

Chapter 1 Overview

You'll study these four number systems, including how to convert numbers from one system
to another.

Operations

Addition and subtraction operations for numbers in different bases will be covered in the
next part.

Number Systems: Types

Numbers are broadly divided into two types:

• Non-Positional Number System

• Positional Number System

Non-Positional Number System

Non-positional number systems were used in old times when there were no counting
methods.

For example, people used to draw lines to count:

• One: |

• Two: ||

• Three: |||

• Four: ||||

• Five: ||||/

• Six: ||||/|

Another example of a non-positional number system is the abacus:


• Abacus: Beads are moved from one side to another for counting. The position of
beads doesn't matter, only the number of beads.

You could also use pebbles for counting.

Drawback of Non-Positional Systems

The major drawback of non-positional number systems is that we couldn't count bigger
numbers using them.

Positional Number Systems

Positional number systems are the modern number systems that we use in daily life. Non-
positional number systems had drawbacks, such as the inability to count large numbers
effectively.

In positional number systems, the position of a symbol (number) determines its value.

For example, the decimal number system is a positional number system.

Decimal Numbers

We use decimal numbers in daily life. A decimal number is a positional number system
where each place has a value.

Digit Position Value

First Ones place

Second Tens place

Third Hundreds place

Fourth Thousands place

Fifth Ten thousands place

Sixth Lakhs place

In positional number systems, the value of a symbol changes based on its position. For
instance, 1 in the ones place means one, but 1 in the tens place means ten, and 1 in the
hundreds place means one hundred.

Specific Positional Number Systems


There are four positional number systems in the course:

• Binary

• Octal

• Decimal

• Hexadecimal

Binary Numbers

Binary means two. In the binary system, only two symbols are used: 0 and 1.

Octal Numbers

Oct means eight. In the octal number system, eight symbols are used: 0, 1, 2, 3, 4, 5,
6, and 7.

Decimal Numbers

Deci means ten. In the decimal number system, ten symbols are used: 0, 1, 2, 3, 4, 5, 6, 7,
8, and 9.

Hexadecimal Numbers

Hexa means six, and deci means ten. Therefore, hexadecimal means 16. In the hexadecimal
number system, 16 symbols are used.

The 16 symbols used are 0 through 15.

Hexadecimal Number System

The hexadecimal number system uses 16 symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and


F. After 9, it uses the letters A through F to represent 10 through 15. The number of symbols
used corresponds to the number system.

Conversions

Understanding number systems is crucial for converting values between them. Conversions
are a key skill to learn, as you likely won't be asked to simply define a number system.

Binary Number System

The binary number system is particularly important. It isn't used in our daily lives, but it's
fundamental to how computers store and process information.

Base-2 System

The binary number system has a base of 2, indicated by the "bi" in "binary."

Base refers to the number of symbols that a number system uses.


Symbols

It uses only two symbols: 0 and 1.

Computer's Language

This system is essential because computers operate using binary.

States

Computers have two states:

• 0 (off)

• 1 (on)

Since computers run on electricity, these states correspond to the presence (1) or absence
(0) of voltage or a signal.

Pulses

Signals are sent as pulses between circuits, and these pulses are either on (1) or off (0).

Why Learn Binary?

Even though computers use binary, humans design computers. Therefore, understanding
binary is crucial for designing and building computer hardware.

What is Binary?

Binary uses only two symbols to represent any number.

Binary Numbers

Let's look at how numbers are represented in binary using the following table:

Decimal Binary

0 0

1 1

2 10

3 11

4 100
Binary Number Conversion

Here's how to convert decimal numbers to binary:

When you reach a limit (like 1), you carry over to the next digit on the left, similar to how
you increment in decimal numbers.

Binary Numbers from 5 to 15

• 5: 1001

• 6: 1010

• 7: 1011

• 8: 1000

• 9: 1001

• 10: 1010

• 11: 1011

• 12: 1100

• 13: 1101

• 14: 1110

• 15: 1111

Methods to Convert Decimal to Binary

There are two methods:

• Actual conversion

• Shortcut method

Shortcut Method

The shortcut method involves remembering the sequence 8 4 2 1. These numbers represent
place values.

• The first place represents 1.

• The second place represents 2.

• The third place represents 4.

• The fourth place represents 8.

For example, to make 7, you add 4 + 2 + 1. So, the binary representation is 0111.
To determine where to put ones, think about it like this: "Put ones in places that add up to
our target number."

Example: Converting 7 to Binary

To convert 7 to binary using the shortcut method:

1. Note that 7 can be obtained by adding 4, 2, and 1.

2. Place a 1 in the places of 4, 2, and 1.

3. Place a 0 in the place of 8 since it's not needed.

Thus, the binary representation of 7 is 0111.

Example: Converting 28 to Binary

To convert 28 to binary, we need to extend our sequence to include 16 since 28 is greater


than 8.

The sequence becomes 16 8 4 2 1. These correspond to powers of 2 ($2^4$ to $2^0$).

To get 28, we add 16 + 8 + 4.

Therefore:

• 16's place: 1

• 8's place: 1

• 4's place: 0

• 2's place: 1

• 1's place: 0

So, the binary representation of 28 is 11100.

Decimal to Binary Conversion

Shortcut Method

The shortcut method is convenient for smaller numbers but can become challenging with
larger numbers.

Divide by Two Method

The proper method for converting decimal to binary is the "divide by two" method. This is
the method that should be used in exams.

• Repeatedly divide the decimal number by 2.

• Keep track of the remainders at each step.


For example, let's convert 28 (base 10) to binary (base 2):

1. Divide 28 by 2:

• 28 ÷ 2 = 14, remainder 0

2. Divide 14 by 2:

• 14 ÷ 2 = 7, remainder 0

3. Divide 7 by 2:

• 7 ÷ 2 = 3, remainder 1 (since 2×3=62×3=6)

4. Divide 3 by 2:

• 3 ÷ 2 = 1, remainder 1 (since 2×1=22×1=2)

5. Last remainder: 1

Now, read the remainders from bottom to top: 11100.

Therefore, 2810=1110022810=111002.

Practice Question

Convert 68 (base 10) into binary.

Solution

Following the divide by two method:

1. 68 ÷ 2 = 34, remainder 0

2. 34 ÷ 2 = 17, remainder 0

3. 17 ÷ 2 = 8, remainder 1

4. 8 ÷ 2 = 4, remainder 0

5. 4 ÷ 2 = 2, remainder 0

6. 2 ÷ 2 = 1, remainder 0

7. Last remainder: 1

Reading the remainders from bottom to top gives us 1000100.

Therefore, 6810=100010026810=10001002.

Binary to Decimal Conversion

Now, let's dive into how to convert from binary to decimal. We're doing this conversion first
because everyone is familiar with decimal numbers.
Understanding Positional Number Systems

Remember, binary, decimal, octal, and hexadecimal are all positional number systems. This
means that each digit's position has a specific value.

In decimal, we have places like ones, tens, hundreds, thousands, etc. In binary, the place
values are powers of 2:

• First place: 20=120=1

• Second place: 21=221=2

• Third place: 22=422=4

• And so on...

Conversion Process

To convert a binary number to decimal:

1. Identify the places where you have a 1.

2. Multiply each 1 by its corresponding place value (power of 2).

3. Add up the results.

For example, let's convert the binary number 100 (base 2) to decimal:

1∗22+0∗21+0∗20=1∗4+0+0=41∗22+0∗21+0∗20=1∗4+0+0=4

So, 100 in binary is equal to 4 in decimal.

Key Insight: You only need to consider the positions where you have a 1 because
the 0 positions will always result in zero.

Example

Convert 1011 (base 2) to decimal:

1∗23+0∗22+1∗21+1∗20=1∗8+0+1∗2+1∗1=8+0+2+1=111∗23+0∗22+1∗21+1∗20=1∗8+0+1∗2+1
∗1=8+0+2+1=11

So, 1011 (base 2) is 11 in decimal.

Exam Tips

In exams, you might see questions like this:

Convert 1011 (base 2) → base 10

This notation indicates that you need to convert the binary number 1011 to its decimal
equivalent.
Example

Convert 1010011 (base 2) to decimal:

To solve this, identify the positions where you have a 1 and calculate their place values:

20=120=1 21=221=2 24=1624=16 27=12827=128

Add them up:

1+2+16+128=1471+2+16+128=147

Therefore, 1010011 (base 2) is equal to 147 in decimal.

Binary to Decimal Conversion

To convert a binary number to a decimal number, multiply each one by its place value and
add them up. The place values are powers of 2, starting from 2020 on the right. If a place
has a zero, its value is not added.

For example, convert the binary number 100001001 to decimal:

1∗28+1∗24+1∗21+1∗201∗28+1∗24+1∗21+1∗20

=256+16+2+1=275=256+16+2+1=275

Octal Numbers

Definition

An octal number system uses eight symbols: 0, 1, 2, 3, 4, 5, 6, and 7.

Decimal and Octal Relationships

The relationship between decimal and octal numbers is as follows:

Decimal Octal

0 0

1 1

2 2

3 3

4 4
Decimal Octal

5 5

6 6

7 7

Binary to Decimal Example

Convert the binary number 100001001 to decimal:

1∗26+1∗22+1∗201∗26+1∗22+1∗20 =64+4+1=69=64+4+1=69

Octal Numbers

Octal numbers use eight symbols, ranging from 0 to 7. Converting decimal to octal is
straightforward as long as we stay within these symbols.

The problem arises when we reach 8 in decimal, because we don't have an equivalent single
symbol in octal. In octal, we "reset" to 0 and add a 1 to the left, similar to how we handle
binary numbers.

• Decimal 8 is represented as 10 in octal.

• Decimal 9 becomes 11 in octal.

• Decimal 10 translates to 12 in octal.

• Decimal 11 is 13 in octal.

• Decimal 12 is 14 in octal.

• Decimal 13 is 15 in octal.

• Decimal 14 is 16 in octal.

• Decimal 15 is 17 in octal.

For 16 in decimal, we reset 7 to 0, incrementing the digit on the left. Therefore, 16 in


decimal is 20 in octal.

While octal numbers might not be as commonly used as other number systems, they do find
applications in certain computers.

Conversions

The primary focus is on conversions, as exam questions will likely revolve around them.
Octal to Binary

For octal numbers, memorize the binary values from 0 to 7.

Decimal/Octal Binary

0 0

1 1

2 10

3 11

4 100

5 101

6 110

7 111

We will discuss these four conversions:

• Binary to Octal

• Octal to Binary

• Octal to Decimal

• Decimal to Octal

Octal to Binary Conversion Made Easy

Octal to Binary is the first conversion, and it is the easiest!

Number System Conversion: Octal to Binary

Here's how to convert an octal number (base 8) to a binary number (base 2).

Conversion Method

The trick is to represent each octal digit with its 3-bit binary equivalent.

Write three-bit binary for each digit.


So, if you are asked to convert the octal number 173 to binary, here's what you do:

1. Write the octal number with spaces between the digits: 1 7 3

2. Convert each digit to its 3-bit binary representation:

• 1 becomes 001

• 7 becomes 111

• 3 becomes 011

3. Concatenate the binary representations: 001111011

Therefore, 1738=00111101121738=0011110112.

Binary Conversion: The 8421 Method

If you're having trouble converting to binary, use the "8421" method. This method relies on
the following place values:

8 4 2 1

2^3 2^2 2^1 2^0

To convert a decimal number to binary, find which combination of these values sums to the
decimal number. Put a 1 in the corresponding columns, and 0 in the others.

Example: Convert 7 to binary

• We can get 7 by adding 4 + 2 + 1

• So, put a 1 in those columns

• This gives us 111, which is the binary representation of 7

Example: Convert 3 to binary

• We can get 3 by adding 2 + 1

• So, put a 1 in those columns

• This gives us 011, which is the binary representation of 3

Number System Conversions

Octal to Binary Conversion

To convert from octal to binary, each octal digit is represented by its 3-bit binary equivalent.

Here's how to convert the octal number 2734 to binary:


1. Write down the octal number with spaces between the digits: 2 7 3 4

2. Convert each digit to its 3-bit binary representation:

• 2 = 010

• 7 = 111

• 3 = 011

• 4 = 100

3. Concatenate the binary equivalents: 010 111 011 100

So, the octal number 2734 is equivalent to the binary number 010111011100.

Binary to Octal Conversion

Converting from binary to octal is the reverse process of converting from octal to binary.

Just reverse of above: Make groups of three. Write octal for each group.

Here's how to convert a binary number to octal:

1. Group the binary digits into sets of three, starting from the right.

2. If the number of binary digits is not a multiple of three, add leading zeros to the
leftmost group to make it a group of three.

3. Convert each group of three binary digits to its octal equivalent.

For example, let's convert the binary number 1101011 to octal.

1. Group the binary digits from the right: 1 101 011

2. Add a leading zero to the leftmost group: 001 101 011

3. Convert each group to its octal equivalent:

• 001 = 1

• 101 = 5

• 011 = 3

Therefore, the binary number 1101011 is equivalent to the octal number 153.

Remember:

• Group in sets of three from right to left.

• Make groups of three from the right hand side.

• If needed, pad the leftmost group with zeros.


Binary Group Octal Equivalent

000 0

001 1

010 2

011 3

100 4

101 5

110 6

111 7

Another example: convert the binary number 10011001100 to octal.

1. Group the binary digits from the right: 10 011 001 100

2. Convert each group to its octal equivalent:

• 010 = 2

• 011 = 3

• 001 = 1

• 100 = 4

Therefore, the binary number 10011001100 is equivalent to the octal number 2314.

Binary to Octal Conversion

To convert from binary to octal, group the binary digits into sets of three starting from the
right side. Then, convert each group of three binary digits into its octal equivalent.

For example, convert the binary number to octal:

100110110
1. Group the digits into sets of three: 100 110 110

2. Convert each group to its octal equivalent: 4 6 6

Therefore, the octal equivalent of the binary number is 466.

Octal to Decimal Conversion

This conversion involves multiplying each digit by its place value and then adding all the
results together. The place values in octal are powers of 8.

Here's how to convert an octal number to decimal:

1. Identify the place value of each digit.

2. Multiply each digit by its place value (which is a power of 8).

3. Add all the results together.

Place Value: In an octal number, the place values are powers of 8, starting from 8^0 on the
rightmost digit.

For example, let's convert the octal number 12 to decimal:

• 2 is in the 8080 place

• 1 is in the 8181 place

Calculation:

1∗81+2∗80=1∗8+2∗1=8+2=101∗81+2∗80=1∗8+2∗1=8+2=10

So, 128=1010128=1010

Example: Converting 4571 (octal) to Decimal

To convert the octal number 4571 into decimal, we need to multiply each digit by its
corresponding power of 8 and then add the results:

1. Place values:

• 1 is at 8080

• 7 is at 8181

• 5 is at 8282

• 4 is at 8383

2. Calculation: 4∗83+5∗82+7∗81+1∗804∗83+5∗82+7∗81+1∗80 4∗512+5∗64+7∗8+1∗14∗


512+5∗64+7∗8+1∗1 2048+320+56+1=24252048+320+56+1=2425

Therefore, 45718=24251045718=242510
Octal to Decimal Conversion

The rule for converting any base number to decimal is similar: take the number at a place
and multiply it by its place value. For octal, place values are powers of 8. For binary, place
values are powers of 2.

Decimal to Octal Conversion

This conversion is similar to decimal to binary.

• To convert from decimal to octal, repeatedly divide by 8.

To convert a decimal to its octal representation, repeatedly divide by 8.

For example, convert 2425 (decimal) to octal.

1. Divide 2425 by 8:

• $2425 / 8 = 303$ with a remainder of 1.

2. Divide 303 by 8:

• $303 / 8 = 37$ with a remainder of 7.

3. Divide 37 by 8:

• $37 / 8 = 4$ with a remainder of 5.

4. The division stops here because 4 is less than 8.

5. Read the remainders from bottom to top: 4571.

Therefore, 2425 in decimal is 4571 in octal.

As a check, recall when 4571 (octal) was converted to decimal, the result was 2425. If a
conversion is done one way, doing the reverse should yield the original number.

Number Systems

So far, we've covered:

• Binary number system and its conversions (Binary to Decimal, Decimal to Binary).

• Octal number system and its conversions (Octal to Binary, Binary to Octal, Octal to
Decimal, Decimal to Octal).

Next, we will discuss the hexadecimal number system.

Hexadecimal Number System

The hexadecimal number system is another number system to learn.

• "Hexa" means 6.
• "Decimal" means 10.

• In hexadecimal, the base is 16, meaning there are 16 symbols used.

Hexadecimal Number System

The hexadecimal number system is a base-16 system, meaning it uses 16 symbols. These
symbols range from 0 to 9 and A to F, where A represents 10, B represents 11, C represents
12, D represents 13, E represents 14, and F represents 15.

• 0-9 represent their usual values.

• A = 10

• B = 11

• C = 12

• D = 13

• E = 14

• F = 15

This system is commonly used in color coding for computers, websites, and other digital
interfaces.

Decimal to Hexadecimal Conversion Table

Decimal Hexadecimal

0 0

1 1

2 2

3 3

4 4

5 5

6 6
Decimal Hexadecimal

7 7

8 8

9 9

10 A

11 B

12 C

13 D

14 E

15 F

When you reach the limit of symbols (F), you reset to 0 and add 1 to the next digit. So, 16 in
decimal is represented as 10 in hexadecimal, and 17 is 11. Note that 10 in hexadecimal is
NOT the same as 10 in decimal.

Practical Use

The practical use for hexadecimal numbers is color coding, such as those used in websites. In
this case, hexadecimal is used to represent different colors.

Hexadecimal Conversions

Hexadecimal to Binary Conversion

To convert a hexadecimal number to binary, write the four-bit binary equivalent for each
hexadecimal digit.

Write four bit binary for each digit.

For example, to convert 1A (hexadecimal) to binary, convert each digit:

• 1 = 0001

• A = 1010
Therefore, 1A (hexadecimal) = 0001 1010 (binary)

Hexadecimal to Binary Conversion

To convert a hexadecimal number to binary:

1. Take each individual digit of the hexadecimal value.

2. Write the 4-bit binary equivalent for each digit.

• For example, to convert 1A into binary:

$ 1A \rightarrow 0001\ 1010 $

• The binary conversion of 1A is 00011010.

Binary Equivalents of Hexadecimal Digits

Hexadecimal Binary

0 0000

1 0001

2 0010

3 0011

4 0100

5 0101

6 0110

7 0111

8 1000

9 1001

A (10) 1010
Hexadecimal Binary

B (11) 1011

C (12) 1100

D (13) 1101

E (14) 1110

F (15) 1111

• Example: Convert 9F1A to binary.

• Write down each digit separately: 9, F, 1, A

• Find the 4-bit binary equivalent for each:

• 9 = 1001

• F = 1111

• 1 = 0001

• A = 1010

• Combine the binary equivalents: 1001 1111 0001 1010

Binary to Hexadecimal Conversion

To convert a binary number to hexadecimal, reverse the process:

1. Make pairs of four binary digits.

2. Write the hexadecimal equivalent for each group.

• Example: Convert 100110011010 from binary to hexadecimal.

1. Split the binary number into groups of four from the right side:

• 1001 1001 1010

2. Convert each group into its hexadecimal equivalent:

• 1001 = 9

• 1001 = 9

• 1010 = A
3. The hexadecimal equivalent is 99A.

Hexadecimal to Decimal Conversion

Here's how to convert from a binary number to its hexadecimal equivalent:

1. Pair the bits into groups of four.

2. Write the hexadecimal equivalent for each group.

For example, to convert the binary number 1010 0001 1111 1001 to hexadecimal:

• 1010 translates to A (since 8 + 2 = 10 in decimal, which is A in hexadecimal)

• 0001 translates to 1

• 1111 translates to F (which is 15 in decimal)

• 1001 translates to 9 (since 8 + 1 = 9)

Putting it all together, the hexadecimal equivalent is 9F1A.

Hexadecimal to Octal Conversion

This conversion is a bit more interesting because we use a shortcut:

1. Convert the hexadecimal number to binary.

2. Convert the binary number to octal.

Example

Convert 1A (hexadecimal) to octal:

1. Separate the hexadecimal digits: 1 and A.

2. Convert each digit to its 4-bit binary equivalent:

• 1 becomes 0001

• A (which is 10 in decimal) becomes 1010

3. Combine the binary equivalents: 0001 1010

4. Group the binary digits into sets of three for octal conversion: 000 110 10

5. Add an extra 0 to the last group, making it 010.

The importance of grouping binary digits into sets of three is due to the fact that each digit in
an octal number represents a power of 8, and each power of 8 can be represented by three
binary digits.

6. Convert each group of three to its octal equivalent:


• 000 becomes 0

• 110 becomes 3

• 010 becomes 2

Therefore, 1A in hexadecimal is 32 in octal.

Practice Problem

Convert 2F9 (hexadecimal) to octal.

• Separate the digits: 2, F, and 9.

• Convert each to 4-bit binary:

• 2 is 0010

• F (15) is 1111

• 9 is 1001

• Combine: 0010 1111 1001

• Group into threes: 001 011 111 001

• Convert each group to octal:

• 001 is 1

• 011 is 3

• 111 is 7

• 001 is 1

The answer is 1371.

Octal to Hexadecimal Conversion

This conversion is the reverse of hexadecimal to octal.

To convert from octal to hexadecimal:

1. Convert the octal number to binary. To convert to binary, represent each octal digit
with its three-bit binary equivalent.

2. Group the binary digits into sets of four.

3. Convert each four-bit group to its hexadecimal equivalent.

Essentially, the process involves converting from octal to binary, and then
from binary to hexadecimal.
Example:

Convert the octal number 1371 to hexadecimal.

1. Convert to binary:

• 1 becomes 001

• 3 becomes 011

• 7 becomes 111

• 1 becomes 001

Combining these gives us the binary number 001011111001.

2. Convert to hexadecimal by grouping into sets of four: 0010 1111 1001

3. Convert each group to hexadecimal:

• 1010 = 9

• 1111 = F

• 0010 = 2

So, the hexadecimal equivalent is 2F9.

Therefore, (1371)8=(2F9)16(1371)8=(2F9)16.

Decimal to Hexadecimal Conversion

To convert from decimal to hexadecimal, repeatedly divide the decimal number by 16.

The hexadecimal base is 16, so repeatedly divide by 16.

Example:

Convert the decimal number 25 to hexadecimal.

1. Divide 25 by 16:

• 25÷16=125÷16=1 with a remainder of 9.

Since the quotient (1) is less than 16, we stop here. 2. Write the remainders in reverse order:

* The hexadecimal equivalent is 19.

Therefore, (25)10=(19)16(25)10=(19)16.## Decimal to Hexadecimal Conversion

To convert a decimal number to hexadecimal, repeatedly divide the decimal number by 16


and keep track of the remainders.

1. Divide the decimal number by 16.


2. Note the remainder.

3. Continue dividing the quotient by 16 until the quotient is less than 16.

4. The remainders, read from bottom to top, give the hexadecimal equivalent.

For example, convert 125 (decimal) to hexadecimal:

• 125÷16=7125÷16=7 with a remainder of 13.

• Since 13 corresponds to 'd' in hexadecimal, the result is 7d.

Hexadecimal to Decimal Conversion

This conversion involves multiplying each digit by its place value. The rule is the same as
converting any base number to decimal.

To convert from any base to decimal, multiply each digit by its place value.

In the case of hexadecimal:

• Place values are powers of 16 (16i16i).

• For binary, place values are powers of 2 (2i2i).

• For octal, place values are powers of 8 (8i8i).

Example 1

Convert 1a (hexadecimal) to decimal:

1. 'a' is in the 160160 place.

2. '1' is in the 161161 place.

3. 'a' represents 10 in decimal.

4. So, 1⋅161+10⋅160=16+10=261⋅161+10⋅160=16+10=26. Therefore, 1a (hexadecimal) is


equal to 26 (decimal).

Example 2

Convert 26f (hexadecimal) to decimal:

1. f is in the 160160 place.

2. 6 is in the 161161 place.

3. 2 is in the 162162 place.

4. f represents 15 in decimal.
So, 2⋅162+6⋅161+15⋅160=2⋅256+6⋅16+15⋅1=512+96+15=6232⋅162+6⋅161+15⋅160=2⋅2
56+6⋅16+15⋅1=512+96+15=623 Therefore, 26f (hexadecimal) is equal to 623
(decimal).

Remember:

• A = 10

• B = 11

• C = 12

• D = 13

• E = 14

• F = 15

Decimal <-> Other Base Conversions

Here's a quick recap of how to convert between decimal and other bases:

Conversion Type Method

Decimal to Binary Repeatedly divide by 2, noting remainders.

Decimal to Octal Repeatedly divide by 8, noting remainders.

Decimal to Hexadecimal Repeatedly divide by 16, noting remainders.

Binary/Octal/Hexadecimal to Multiply each digit by its place value (power of the


Decimal base).

You might also like