0% found this document useful (0 votes)
7 views8 pages

Computer Conversions

The document outlines the processes for converting binary numbers to denary (decimal) and denary to binary, including detailed examples. It also explains how to convert denary to hexadecimal and hexadecimal to denary, providing step-by-step instructions and examples for each conversion type. Additionally, it includes a quick reference for hexadecimal digits and their binary equivalents.

Uploaded by

kritiaadhya
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)
7 views8 pages

Computer Conversions

The document outlines the processes for converting binary numbers to denary (decimal) and denary to binary, including detailed examples. It also explains how to convert denary to hexadecimal and hexadecimal to denary, providing step-by-step instructions and examples for each conversion type. Additionally, it includes a quick reference for hexadecimal digits and their binary equivalents.

Uploaded by

kritiaadhya
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/ 8

Computer – SE2

Steps to Convert Binary to Denary:

1. Write down the binary number.


2. List the powers of 2 starting from the right Multiply each binary digit by the
corresponding power of 2.
3. Add up the results of the multiplications.

Example 1: Convert 1101 (binary) to decimal.

1. Binary number: 1101


2. List the powers of 2 from right to left:
a. That’s: 8, 4, 2, 1
3. Multiply each binary digit by its corresponding power of 2:
a. First bit: 1 * 8 = 8
b. Second bit: 1 * 4 = 4
c. Third bit: 0 * 2 = 0
d. Fourth bit: 1 * 1 = 1
4. Add up the results:
a. 8+4+0+1=13
b. So, the binary number 1101 equals 13 in decimal (denary).

Example 2: Convert 101010 (binary) to decimal.

1. Binary number: 101010


2. List the powers of 2:
a. That’s: 32, 16, 8, 4, 2, 1
3. Multiply each binary digit by the corresponding power of 2:
a. First bit: 1 * 32 = 32
b. Second bit: 0 * 16 = 0
c. Third bit: 1 * 8 = 8
d. Fourth bit: 0 * 4 = 0
e. Fifth bit: 1 * 2 = 2
f. Sixth bit: 0 * 1 = 0
4. Add up the results:
a. 32+0+8+0+2+0=42

So, the binary number 101010 equals 42 in decimal.

Steps to Convert Denary (Decimal) to Binary:

1. Divide the decimal number by 2.


2. Record the remainder (either 0 or 1) for each division.
3. Repeat the division with the quotient (the result from the previous division)
until the quotient is 0.
4. Write the remainders in reverse order (from bottom to top), and that gives
you the binary representation.

Example 1: Convert 13 (denary) to binary.

1. Divide 13 by 2:
a. Quotient: 6, Remainder: 1
2. Divide 6 by 2:
a. Quotient: 3, Remainder: 0
3. Divide 3 by 2:
a. Quotient: 1, Remainder: 1
4. Divide 1 by 2:
a. Quotient: 0, Remainder: 1 (stop here)

Now, take the remainders and write them in reverse order: 1101

So, 13 (denary) is 1101 (binary).


Example 2: Convert 42 (denary) to binary.

1. Divide 42 by 2:
a. Quotient: 21, Remainder: 0
2. Divide 21 by 2:
a. Quotient: 10, Remainder: 1
3. Divide 10 by 2:
a. Quotient: 5, Remainder: 0
4. Divide 5 by 2:
a. Quotient: 2, Remainder: 1
5. Divide 2 by 2:
a. Quotient: 1, Remainder: 0
6. Divide 1 by 2:
a. Quotient: 0, Remainder: 1 (stop here)

Now, write the remainders in reverse order: 101010

So, 42 (denary) is 101010 (binary).

Quick Trick:

If you’re familiar with powers of 2, you can also look for which powers of 2 add up to
the number. For example:

• For 42:
42=32+8+242 = 32 + 8 + 242=32+8+2, which is represented as 101010 in binary.

Step 1: Binary to Denary

Process:

• Binary numbers are based on powers of 2.


• Starting from the right, each digit is multiplied by the corresponding power of 2
and added up to get the denary (decimal) value.

Example: Convert binary 110101 to denary

1. Write the binary number: 110101


2. List the corresponding powers of 2 starting from the right:
a. This is: 32, 16, 8, 4, 2, 1.
3. Multiply each binary digit by the corresponding power of 2:
a. 1 * 32 = 32
b. 1 * 16 = 16
c. 0 * 8 = 0
d. 1 * 4 = 4
e. 0 * 2 = 0
f. 1 * 1 = 1
4. Add the results:
a. 32 + 16 + 0 + 4 + 0 + 1 = 53

So, 110101 (binary) = 53 (denary).

Step 2: Denary to Hexadecimal

Process:

• To convert denary to hexadecimal, divide the denary number by 16 and record


the remainders.
• Repeat the division process until the quotient is 0.
• The remainders, read from bottom to top, give you the hexadecimal value.

Example: Convert denary 53 to hexadecimal

1. Divide 53 by 16:
a. 53 ÷ 16 = 3 with a remainder of 5.
b. The quotient is 3 and the remainder is 5.
2. Divide 3 by 16:
a. 3 ÷ 16 = 0 with a remainder of 3.
b. The quotient is now 0, so we stop here.
3. Write the remainders from bottom to top:
a. The remainders are 3 and 5, so 53 (denary) = 35 (hexadecimal).

Summary of Steps:

1. Binary → Denary:
a. Convert 110101 (binary) to 53 (denary).
2. Denary → Hexadecimal:
a. Convert 53 (denary) to 35 (hexadecimal).

One More Example:

Let's do the same process with another example.


Convert binary 101110 to denary and hexadecimal:

1. Binary to Denary:
a. Binary: 101110
b. =46

So, 101110 (binary) = 46 (denary).

2. Denary to Hexadecimal:
a. 46 ÷ 16 = 2, remainder 14 (14 in hexadecimal is E).
b. 2 ÷ 16 = 0, remainder 2.
c. The remainders from bottom to top: 2 and E.

So, 46 (denary) = 2E (hexadecimal).

Final Conclusion:

• 110101 (binary) → 53 (denary) → 35 (hexadecimal)


• 101110 (binary) → 46 (denary) → 2E (hexadecimal)

Converting Denary (Decimal) to Hexadecimal:

1. Divide the denary number by 16.


a. The quotient will be used in the next division step.
b. The remainder will give us the hexadecimal digit.
2. Repeat the division with the new quotient until the quotient is 0.
3. The hexadecimal number is the collection of remainders, read from bottom to
top.

Example: Convert Denary 254 to Hexadecimal

Let’s walk through this step-by-step:

Step 1: Divide 254 by 16

• 254 ÷ 16 = 15 quotient with remainder 14.


• 14 in hexadecimal is E.

Step 2: Divide 15 by 16

• 15 ÷ 16 = 0 quotient with remainder 15.


• 15 in hexadecimal is F.

Now, we collect the remainders: F and E.


Reading from bottom to top, 254 (denary) = FE (hexadecimal).

Example: Convert Denary 500 to Hexadecimal

1. Divide 500 by 16:


a. 500 ÷ 16 = 31 quotient with remainder 4.
b. Remainder: 4.
2. Divide 31 by 16:
a. 31 ÷ 16 = 1 quotient with remainder 15.
b. Remainder: 15 (which is F in hexadecimal).
3. Divide 1 by 16:
a. 1 ÷ 16 = 0 quotient with remainder 1.
b. Remainder: 1.

Now, collect the remainders: 1, F, and 4.

Reading from bottom to top: 500 (denary) = 1F4 (hexadecimal).

Quick Reference for Hexadecimal Digits:

• 0-9 stay the same.


• 10 = A, 11 = B, 12 = C, 13 = D, 14 = E, 15 = F.

Summary of the Process:

• Divide the number by 16.


• Collect remainders.
• Read remainders bottom to top to get the hexadecimal value.

1. Hexadecimal to Denary (Decimal)

To convert hexadecimal to denary, follow these steps:

Steps:

1. Write down the hexadecimal number.


2. Assign each digit a power of 16, starting from the right Multiply each
hexadecimal digit by the corresponding power of 16.
3. Add up the results to get the denary value.
Example: Convert hexadecimal 2F to denary

Hexadecimal 2F to Denary:

2F = (2 × 16^1) + (F × 16^0)
F = 15 in decimal
2 × 16 = 32
15 × 1 = 15
32 + 15 = 47

So, 2F in denary is 47

So, 2F (hex) = 47 (denary)

So, 2F (hexadecimal) = 47 (denary).

2. Hexadecimal to Binary

To convert hexadecimal to binary, follow these steps:

Steps:

1. Write down the hexadecimal number.


2. Convert each hexadecimal digit to a 4-bit binary number (you can use a lookup
table for this).
3. Combine the 4-bit binary representations for each hexadecimal digit.

Example: Convert hexadecimal 2F to binary

1. Write the hexadecimal number: 2F


2. Convert each digit to binary:
a. 2 in hexadecimal = 0010 in binary
b. F in hexadecimal = 1111 in binary
3. Combine the binary digits:
a. 2F (hexadecimal) = 00101111 (binary)

Quick Hex to Binary Lookup:

Here’s a quick reference for converting individual hexadecimal digits to binary:

Hex Binary
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
A 1010
B 1011
C 1100
D 1101
E 1110
F 1111

Summary:

1. Hexadecimal to Denary: Multiply each digit by the corresponding power of 16


and add up the results.
2. Hexadecimal to Binary: Convert each digit to a 4-bit binary number and get the
results

You might also like