3.1.2. Number System Conversion Decimal To Non-Decimal

To convert a number system from decimal to non-decimal, we need to use math operations: modulo and division.

tinyurl_algo Non-Decimal To Decimal

To convert a number system from non-decimal to decimal, we need to use one new math operations: exponent.


Figure 3.1.1 Sloth likes 8-based octal.

In the following graph, we convert from binary to octal. Because our computation operations like +, -, * and / are all assuming decimal numbers, we can first convert it to decimal, and then convert from decimal to octal.