How do you convert a number between decimal and binary?

The number system we use to write numbers is called a positional system. Each digit of the number is a multiplier of the increasing powers of the base. So for binary:
10112 = 1 * 23 + 0 * 22 + 1 * 21 + 1 * 20 To convert the number 10112 to decimal, we simply need to add and multiply:= 8 + 0 + 2 + 1 = 1110 (we usually don't write the base in decimal number, this is just for illustrative purposes.
To convert a decimal number into binary, we use a different method. We take on any decimal number, e.g. 294, and continuously divide it by 2 with a reminder, like so:
294 : 2 = 147 | remainder: 0 - least significant bit (last digit)147 : 2 = 73 | remainder: 173 : 2 = 36 | remainder: 136 : 2 = 18 | remainder: 018 : 2 = 9 | remainder: 09 : 2 = 4 | remainder: 14 : 2 = 2 | remainder: 02 : 2 = 1 | remainder: 01 : 2 = 0 | remainder: 1 - most significant bit (first digit)0
So the decimal number 294 converts to: 1001001102And this holds for all numbers.

KM
Answered by Kacper M. Computing tutor

1536 Views

See similar Computing IB tutors

Related Computing IB answers

All answers ▸

What is a network protocol and why do we need it?


Name several sort algorithms of an array, their working principles and their efficency.


What is encapsulation?


Define the terms CU and ALU and briefly explain their roles in the CPU.


We're here to help

contact us iconContact ustelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

MyTutor is part of the IXL family of brands:

© 2025 by IXL Learning