Day-15: Number Conversion.

By | May 21, 2022

Decimal to Binary Conversion.

Decimal to binary calculation steps, Let’s calculate a decimal value 12345 to the binary numbers.

Divide by the base 2 to get the digits from the remainders:

Division
by 2
QuotientThe remainder (Digit)Bit #
(123456)/26172800
(61728)/23086401
(30864)/21543202
(15432)/2771603
(7716)/2385804
(3858)/2192905
(1929)/296416
(964)/248207
(482)/224108
(241)/212019
(120)/260010
(60)/230011
(30)/215012
(15)/27113
(7)/23114
(3)/21115
(1)/20116

= (11110001001000000)2

Decimal to Octal Conversion.

Decimal to octal calculation steps, Let’s calculate a decimal value 9875421 to the binary numbers.

Divide by the base 8 to get the digits from the remainders:

Division
by 8
QuotientThe remainder (Digit)Digit #
(9875421)/8123442750
(1234427)/815430331
(154303)/81928772
(19287)/8241073
(2410)/830124
(301)/83755
(37)/8456
(4)/8047

= (45527735)8

Decimal to Hexadecimal Conversion.

Decimal to hex calculation steps, Let’s calculate a decimal value 7891011 to the binary numbers.

Divide by the base 16 to get the digits from the remainders:

Division
by 16
QuotientThe remainder (Digit)Digit #
(7891011)/1649318830
(493188)/163082441
(30824)/16192682
(1926)/1612063
(120)/16784
(7)/16075

= (786843)16

Octal to Decimal Conversion.

Octal to decimal calculation steps, Let’s calculate a decimal value of 1234567 to the binary numbers.

1234567 = (1 × 8⁶) + (2 × 8⁵) + (3 × 8⁴) + (4 × 8³) + (5 × 8²) + (6 × 8¹) + (7 × 8⁰) = 342391

Octal to Binary Conversion.

Convert each octal digit to 3 binary digits (see conversion table below):
165421
= 1 6 5 4 2 1
= 001 110 101 100 010 001
= 001110101100010001

Octal to Hexa Decimal Conversion.

Convert every octal digit to 3 binary digits, then convert every 4 binary digits to1 hex digit (see conversion tables):
652341
= 6 5 2 3 4 1
= 110 101 010 011 100 001
= 11 0101 0100 1110 0001
= 3 5 4 E 1
= 354E1

Binary to Decimal Conversion.

Let’s calculate a binary value of 101011101 to the Decimal numbers.

(101011101)₂ = (1 × 2⁸) + (0 × 2⁷) + (1 × 2⁶) + (0 × 2⁵) + (1 × 2⁴) + (1 × 2³) + (1 × 2²) + (0 × 2¹) + (1 × 2⁰) = (349)₁₀

Binary to Octal Conversion.

Let’s calculate a binary value of 110110111 to the Octal numbers.

Convert every 3 binary digits (from bit0) to octal digit (see conversion table below):
110110111
= 110 110 111
= 6 6 7
= 667

Binary to Hexa Decimal Conversion.

Let’s calculate a binary value of 11011001 to the Hexa Decimal numbers.

Convert every 4 binary digits (from bit0) to a hex digit (see conversion table below):
11011001
= 1101 1001
= D 9
= D9

Hexa Decimal to Decimal Conversion.

Decimal calculation steps

Let’s calculate a Hexa Decimal value of dabc9856b to the Decimal numbers.

(DABC9856B)₁₆ = (13 × 16⁸) + (10 × 16⁷) + (11 × 16⁶) + (12 × 16⁵) + (9 × 16⁴) + (8 × 16³) + (5 × 16²) + (6 × 16¹) + (11 × 16⁰) = (58716685675)₁₀

Hexa Decimal to Octal Conversion.

Let’s calculate a Hexa Decimal value of bdacf7d3a to the Octal numbers.

Convert each hex digit to 4 binary digits and then convert each 3 binary digits to octal digits (see conversion tables below):
bdacf7d3a
= b d a c f 7 d 3 a
= 1011 1101 1010 1100 1111 0111 1101 0011 1010
= 101 111 011 010 110 011 110 111 110 100 111 010
= 5 7 3 2 6 3 6 7 6 4 7 2
= 573263676472

Hexa Decimal to Binary Conversion.

Let’s calculate a Hexa Decimal value of bdacf7d3a to the Octal numbers.

Convert each hex digit to 4 binary digits (see conversion table below):
bdacf7d3a
= b d a c f 7 d 3 a
= 1011 1101 1010 1100 1111 0111 1101 0011 1010
= 101111011010110011110111110100111010

Leave a Reply

Your email address will not be published.