Course Content
Numeral Systems 101
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.
# Defining list for storing the date date = [7,4,2010] print("The initial date is" + " " + str(date[2]) + " " + "year" + " " + str(date[1]) + "th" + " " + "day" + " " + "of" + " " + str(date[0]) + "th"+" "+"month" ) # Creating a list for storing the converted binary date date_bin = [ ] # Iterating through the list for number in date: # Creating list for storing converted binary number binary_number = [ ] # The loop will execute till the number is not null while number != 0: # Counting the remainder of division by two remainder = number % 2 # Appending the remainder for creating binary one binary_number.append(remainder) # This operation allows to decrease number twice and work with the integer part of a new one number = number // 2 # Reversing the list binary_number.reverse() # Appending the resulting binary number for creating binary date date_bin.append(binary_number) print("The date in binary numeral system is",date_bin)
Swipe to show code editor
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.
Thanks for your feedback!
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.
# Defining list for storing the date date = [7,4,2010] print("The initial date is" + " " + str(date[2]) + " " + "year" + " " + str(date[1]) + "th" + " " + "day" + " " + "of" + " " + str(date[0]) + "th"+" "+"month" ) # Creating a list for storing the converted binary date date_bin = [ ] # Iterating through the list for number in date: # Creating list for storing converted binary number binary_number = [ ] # The loop will execute till the number is not null while number != 0: # Counting the remainder of division by two remainder = number % 2 # Appending the remainder for creating binary one binary_number.append(remainder) # This operation allows to decrease number twice and work with the integer part of a new one number = number // 2 # Reversing the list binary_number.reverse() # Appending the resulting binary number for creating binary date date_bin.append(binary_number) print("The date in binary numeral system is",date_bin)
Swipe to show code editor
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.
Thanks for your feedback!
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.
# Defining list for storing the date date = [7,4,2010] print("The initial date is" + " " + str(date[2]) + " " + "year" + " " + str(date[1]) + "th" + " " + "day" + " " + "of" + " " + str(date[0]) + "th"+" "+"month" ) # Creating a list for storing the converted binary date date_bin = [ ] # Iterating through the list for number in date: # Creating list for storing converted binary number binary_number = [ ] # The loop will execute till the number is not null while number != 0: # Counting the remainder of division by two remainder = number % 2 # Appending the remainder for creating binary one binary_number.append(remainder) # This operation allows to decrease number twice and work with the integer part of a new one number = number // 2 # Reversing the list binary_number.reverse() # Appending the resulting binary number for creating binary date date_bin.append(binary_number) print("The date in binary numeral system is",date_bin)
Swipe to show code editor
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.
Thanks for your feedback!
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.
# Defining list for storing the date date = [7,4,2010] print("The initial date is" + " " + str(date[2]) + " " + "year" + " " + str(date[1]) + "th" + " " + "day" + " " + "of" + " " + str(date[0]) + "th"+" "+"month" ) # Creating a list for storing the converted binary date date_bin = [ ] # Iterating through the list for number in date: # Creating list for storing converted binary number binary_number = [ ] # The loop will execute till the number is not null while number != 0: # Counting the remainder of division by two remainder = number % 2 # Appending the remainder for creating binary one binary_number.append(remainder) # This operation allows to decrease number twice and work with the integer part of a new one number = number // 2 # Reversing the list binary_number.reverse() # Appending the resulting binary number for creating binary date date_bin.append(binary_number) print("The date in binary numeral system is",date_bin)
Swipe to show code editor
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.