While working with your RevPi system you will always be confronted with different number systems. For all of you who are new to the topic and for those of you who have learned and repressed this at some point, we have created a small summary here.

Binary number system

The binary number system is the basis for electronic data processing, since only two logical states (1 and 0) can be distinguished here. A computer must therefore make all calculations with these two numbers.

At first glance this looks as if there are very limited possibilities to express oneself with this number system. However, as in all other number systems, we have places available that take values. The binary number system is based on the number 2, which means that the values here simply double:

8421
 … 23 22 2120

Each of these digits can have two different values (0 or 1) A single-digit dual number is called a bit (binary digit). Thus two numbers can be represented with one bit (0 or 1). With 2 bits the possibilities are doubled:
00, 01, 10, 11

Example :

We calculate the decimal number 19 into the dual number system:

  • Write down a table that goes from the one digit of the dual system to the digit that is smaller (or the same size) than 19.
168421
  • Write a 1 under the largest value that fits into the 19.
168421
1
  • Subtract 16 out of 19. You get a residual value of 3.
  • Write a 1 under the largest value that fits into the 3.
168421
1 1
  • Subtract 2 from 3. You get a residual value of 1.
168421
111
  • Subtract 1 from 1, you get the residual value 0, fill the empty fields of the table with 0.
168421
10011

The decimal number 19 corresponds to the dual number 10011.

Hexadecimal number system

The hexadecimal number system is used to display large dual numbers clearly. Long bit sequences are divided into 4 bits each and converted into a hexadecimal number.

Example:

Bit sequence010100001100101000111111
Grouped bit sequence010100001100101000111111
Converting to Hex Numbers50CA3F
Grouped hex numbers50CA3F

 

Overview of number systems

NumberHexadecimalDecimalBinary/Dual
Position1214321
1000000
2110001
3220010
4330011
5440100
6550101
7660110
8770111
9881000
10991001
11A101010
12B111011
13C121100
14D131101
15E141110
16F151111

Don’t make it so hard!

Mental arithmetic keeps you mentally fit, but if you need it to be fast, you can also use the accessory calculator on your PC:

  • Open the Accessory Calculator.
  • Switch to the programmer view.
  • Enter a value.
  • Select the desired number system.

The value is displayed in the desired number system.