Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Cipher Some Numbers | Binary Numeral System
Numeral Systems 101
course content

Course Content

Numeral Systems 101

Numeral Systems 101

1. Binary Numeral System
2. Octal Numeral system
3. Hexadecimal Numeral system
4. Revelation

bookCipher Some Numbers

You are one step closer to becoming a computer geek 🤓

You are going to stand out with such knowledge because working with different programs will be light work. For instance, you are going to have the possibility to correct a lot of mistakes program-wise because you are into all these processes. Probably, you came across built-in python functions, such as min, max. I guess you understand that to deal with them it is better to understand the way it is working. Therefore, the useful thing is to be aware of the "interior" of all actions due to the reason that it will be easy for you to recognize and correct mistakes. However, I don't want to bring any depth into it so let's just dive deeper into binary numbers.

  1. You need to divide the number by 2 and take down the remainder of the division
  2. Then you should calculate the received number and implement the first step to it.
  3. You can stop if division results in 0.
  4. Rewrite remainders in the reversed order.

The best way to get the idea of binary numbers is to convert them by yourself. The rule is pretty simple! We are going to try it with the number 14.

1234567891011121314151617181920212223
# Defining decimal number decimal_number = 0 # Creating list for storing the converted binary number binary_number = [] # The text should be realised here due to the reason that further the decimal number will be changed print("The number in decimal numeral system is:", decimal_number) # The conformity for 0 in a decimal numeration system is 0; hence, this condition implemented if decimal_number == 0: binary_number.append(0) # Otherwise, we need to convert it else: # The loop will execute till the number is zero while decimal_number != 0: # Counting the remainder of dividing by two remainder = decimal_number % 2 # Appending the resulting number 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 decimal_number = decimal_number // 2 # Reversing the list binary_number.reverse() # Printing the result print("The number in binary numeral system is:", binary_number)
copy
Task
test

Swipe to show code editor

Convert the decimal number 73 to a binary numeral system. You should follow the instructions and fill the gaps. The explanation why this number was chosen is waiting for you at the end of this chapter.

  1. Create an empty list for storing binary digits.
  2. Print the decimal_number.
  3. Define the loop that executes till the decimal_number is 0.
  4. Count the remainder of division decimal_number by 2.
  5. Append the remainder to the list of binary numbers.
  6. Decrease decimal_number using integer division by 2.
  7. Make the list of binary numbers reversed.
  8. Print the list of binary numbers.

Note

The fans of "Big Bang Theory" may be guessed why this number is special.
Yeah, it is Sheldon Cooper's favorite number. He explains that 73 is the 21st prime number, and its mirror,37, is the 12th prime number which is the mirror of 21, and 21 is the product of 7 and 3. Also, you've proved that last Sheldon's statement that in binary representation it is 1001001 that is a palindrome number.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 5
toggle bottom row

bookCipher Some Numbers

You are one step closer to becoming a computer geek 🤓

You are going to stand out with such knowledge because working with different programs will be light work. For instance, you are going to have the possibility to correct a lot of mistakes program-wise because you are into all these processes. Probably, you came across built-in python functions, such as min, max. I guess you understand that to deal with them it is better to understand the way it is working. Therefore, the useful thing is to be aware of the "interior" of all actions due to the reason that it will be easy for you to recognize and correct mistakes. However, I don't want to bring any depth into it so let's just dive deeper into binary numbers.

  1. You need to divide the number by 2 and take down the remainder of the division
  2. Then you should calculate the received number and implement the first step to it.
  3. You can stop if division results in 0.
  4. Rewrite remainders in the reversed order.

The best way to get the idea of binary numbers is to convert them by yourself. The rule is pretty simple! We are going to try it with the number 14.

1234567891011121314151617181920212223
# Defining decimal number decimal_number = 0 # Creating list for storing the converted binary number binary_number = [] # The text should be realised here due to the reason that further the decimal number will be changed print("The number in decimal numeral system is:", decimal_number) # The conformity for 0 in a decimal numeration system is 0; hence, this condition implemented if decimal_number == 0: binary_number.append(0) # Otherwise, we need to convert it else: # The loop will execute till the number is zero while decimal_number != 0: # Counting the remainder of dividing by two remainder = decimal_number % 2 # Appending the resulting number 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 decimal_number = decimal_number // 2 # Reversing the list binary_number.reverse() # Printing the result print("The number in binary numeral system is:", binary_number)
copy
Task
test

Swipe to show code editor

Convert the decimal number 73 to a binary numeral system. You should follow the instructions and fill the gaps. The explanation why this number was chosen is waiting for you at the end of this chapter.

  1. Create an empty list for storing binary digits.
  2. Print the decimal_number.
  3. Define the loop that executes till the decimal_number is 0.
  4. Count the remainder of division decimal_number by 2.
  5. Append the remainder to the list of binary numbers.
  6. Decrease decimal_number using integer division by 2.
  7. Make the list of binary numbers reversed.
  8. Print the list of binary numbers.

Note

The fans of "Big Bang Theory" may be guessed why this number is special.
Yeah, it is Sheldon Cooper's favorite number. He explains that 73 is the 21st prime number, and its mirror,37, is the 12th prime number which is the mirror of 21, and 21 is the product of 7 and 3. Also, you've proved that last Sheldon's statement that in binary representation it is 1001001 that is a palindrome number.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 5
toggle bottom row

bookCipher Some Numbers

You are one step closer to becoming a computer geek 🤓

You are going to stand out with such knowledge because working with different programs will be light work. For instance, you are going to have the possibility to correct a lot of mistakes program-wise because you are into all these processes. Probably, you came across built-in python functions, such as min, max. I guess you understand that to deal with them it is better to understand the way it is working. Therefore, the useful thing is to be aware of the "interior" of all actions due to the reason that it will be easy for you to recognize and correct mistakes. However, I don't want to bring any depth into it so let's just dive deeper into binary numbers.

  1. You need to divide the number by 2 and take down the remainder of the division
  2. Then you should calculate the received number and implement the first step to it.
  3. You can stop if division results in 0.
  4. Rewrite remainders in the reversed order.

The best way to get the idea of binary numbers is to convert them by yourself. The rule is pretty simple! We are going to try it with the number 14.

1234567891011121314151617181920212223
# Defining decimal number decimal_number = 0 # Creating list for storing the converted binary number binary_number = [] # The text should be realised here due to the reason that further the decimal number will be changed print("The number in decimal numeral system is:", decimal_number) # The conformity for 0 in a decimal numeration system is 0; hence, this condition implemented if decimal_number == 0: binary_number.append(0) # Otherwise, we need to convert it else: # The loop will execute till the number is zero while decimal_number != 0: # Counting the remainder of dividing by two remainder = decimal_number % 2 # Appending the resulting number 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 decimal_number = decimal_number // 2 # Reversing the list binary_number.reverse() # Printing the result print("The number in binary numeral system is:", binary_number)
copy
Task
test

Swipe to show code editor

Convert the decimal number 73 to a binary numeral system. You should follow the instructions and fill the gaps. The explanation why this number was chosen is waiting for you at the end of this chapter.

  1. Create an empty list for storing binary digits.
  2. Print the decimal_number.
  3. Define the loop that executes till the decimal_number is 0.
  4. Count the remainder of division decimal_number by 2.
  5. Append the remainder to the list of binary numbers.
  6. Decrease decimal_number using integer division by 2.
  7. Make the list of binary numbers reversed.
  8. Print the list of binary numbers.

Note

The fans of "Big Bang Theory" may be guessed why this number is special.
Yeah, it is Sheldon Cooper's favorite number. He explains that 73 is the 21st prime number, and its mirror,37, is the 12th prime number which is the mirror of 21, and 21 is the product of 7 and 3. Also, you've proved that last Sheldon's statement that in binary representation it is 1001001 that is a palindrome number.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

You are one step closer to becoming a computer geek 🤓

You are going to stand out with such knowledge because working with different programs will be light work. For instance, you are going to have the possibility to correct a lot of mistakes program-wise because you are into all these processes. Probably, you came across built-in python functions, such as min, max. I guess you understand that to deal with them it is better to understand the way it is working. Therefore, the useful thing is to be aware of the "interior" of all actions due to the reason that it will be easy for you to recognize and correct mistakes. However, I don't want to bring any depth into it so let's just dive deeper into binary numbers.

  1. You need to divide the number by 2 and take down the remainder of the division
  2. Then you should calculate the received number and implement the first step to it.
  3. You can stop if division results in 0.
  4. Rewrite remainders in the reversed order.

The best way to get the idea of binary numbers is to convert them by yourself. The rule is pretty simple! We are going to try it with the number 14.

1234567891011121314151617181920212223
# Defining decimal number decimal_number = 0 # Creating list for storing the converted binary number binary_number = [] # The text should be realised here due to the reason that further the decimal number will be changed print("The number in decimal numeral system is:", decimal_number) # The conformity for 0 in a decimal numeration system is 0; hence, this condition implemented if decimal_number == 0: binary_number.append(0) # Otherwise, we need to convert it else: # The loop will execute till the number is zero while decimal_number != 0: # Counting the remainder of dividing by two remainder = decimal_number % 2 # Appending the resulting number 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 decimal_number = decimal_number // 2 # Reversing the list binary_number.reverse() # Printing the result print("The number in binary numeral system is:", binary_number)
copy
Task
test

Swipe to show code editor

Convert the decimal number 73 to a binary numeral system. You should follow the instructions and fill the gaps. The explanation why this number was chosen is waiting for you at the end of this chapter.

  1. Create an empty list for storing binary digits.
  2. Print the decimal_number.
  3. Define the loop that executes till the decimal_number is 0.
  4. Count the remainder of division decimal_number by 2.
  5. Append the remainder to the list of binary numbers.
  6. Decrease decimal_number using integer division by 2.
  7. Make the list of binary numbers reversed.
  8. Print the list of binary numbers.

Note

The fans of "Big Bang Theory" may be guessed why this number is special.
Yeah, it is Sheldon Cooper's favorite number. He explains that 73 is the 21st prime number, and its mirror,37, is the 12th prime number which is the mirror of 21, and 21 is the product of 7 and 3. Also, you've proved that last Sheldon's statement that in binary representation it is 1001001 that is a palindrome number.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Section 1. Chapter 5
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
We're sorry to hear that something went wrong. What happened?
some-alt