Course Content
Numeral Systems 101
2. Octal Numeral system
3. Hexadecimal Numeral system
Numeral Systems 101
Hone your Ciphering Skills
You've passed a lot, congratulations!🥳
Try to do the same, but with other numbers, for instance, you can cipher to binary code the combinations of numbers like the date, let's try it with the 4th of July in the 2010 year, we are going to create a list.
Note
Have you wondered? Binary numbers are stored as a group of bits. For example, 11100 requires 5 bits one bit for each digit, but 100000 requires 6 bites, the 8 bits create 1 byte. It is not brand new information that computers stores billion information, so as it is a smart device, it should have a smart system of storing information. I reckon that your phone has a 64-bit microprocessor means that it stores and gets access to the information in groups of 64 binary digits; can you imagine how much information it deals with? It can be even a billion groups of 64-bit combinations.
Task
Try to convert something interesting to binary code and look at it! For instance, try to convert the first seven digits of the Fibonacci sequence to the binary code. Follow the algorithm on the right and fill the gaps.
- Iterate through the
fibs
list. - Create empty list
fib_binary
for storing converted Fibonacci numbers. - Check if
fib_decimal
variable is0
. - Count the remainder of division
fib_decimal
variable by2
. - Append the
remainder
to thefib_binary
list. - Make the
fib_binary
listreversed
. - Print the
sequence
in binary form.
Everything was clear?