Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Converting Using Format Method | Revelation
Numeral Systems 101
course content

Зміст курсу

Numeral Systems 101

Numeral Systems 101

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

Converting Using Format Method

I appreciate your desire to study 👏 if you are here, it means you are motivated a lot.

The last push of studying numeral systems is learning the format method for strings to convert numbers to different numeral systems.

format() allows you to do the complex substitution, but it goes beyond this course; hence, here you are going to get acquainted with converting numbers using this method. By the way, it is an opportunity for you to pick up the one that you prefer.

This example shows you how decimal numbers can be converted to other numeral systems.

  • {:b} is used to define the binary numeral system;
  • {:o} or {:O} (both ways are acceptable) is used to define the octal numeral system;
  • {:X} (the hexadecimal number must be defined using uppercase letters) or {:x}(the hexadecimal number must be defined using lowercase letters) is used to define the hexadecimal numeral system.

Subsequently, you should use the following syntax:
{:numeral_system_format}.format argument). This method has a significant benefit it prints your number without 0b, 0o, 0x, only converted number. But unfortunately to convert not decimal numbers you should write 0b, 0o or 0X. The decimal converting is diverse you can use 3 methods 😃: {},{:n} or {:d}

Завдання

It's time for honing your skills!

  1. Convert number 12 from the hexadecimal numeral system to the decimal.
  2. Convert number 23 from the octal numeral system to the hexadecimal.
  3. Convert number 100 from the binary numeral system to the octal.
  4. Convert number 900 from the decimal numeral system to the binary.

Завдання

It's time for honing your skills!

  1. Convert number 12 from the hexadecimal numeral system to the decimal.
  2. Convert number 23 from the octal numeral system to the hexadecimal.
  3. Convert number 100 from the binary numeral system to the octal.
  4. Convert number 900 from the decimal numeral system to the binary.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 4. Розділ 3
toggle bottom row

Converting Using Format Method

I appreciate your desire to study 👏 if you are here, it means you are motivated a lot.

The last push of studying numeral systems is learning the format method for strings to convert numbers to different numeral systems.

format() allows you to do the complex substitution, but it goes beyond this course; hence, here you are going to get acquainted with converting numbers using this method. By the way, it is an opportunity for you to pick up the one that you prefer.

This example shows you how decimal numbers can be converted to other numeral systems.

  • {:b} is used to define the binary numeral system;
  • {:o} or {:O} (both ways are acceptable) is used to define the octal numeral system;
  • {:X} (the hexadecimal number must be defined using uppercase letters) or {:x}(the hexadecimal number must be defined using lowercase letters) is used to define the hexadecimal numeral system.

Subsequently, you should use the following syntax:
{:numeral_system_format}.format argument). This method has a significant benefit it prints your number without 0b, 0o, 0x, only converted number. But unfortunately to convert not decimal numbers you should write 0b, 0o or 0X. The decimal converting is diverse you can use 3 methods 😃: {},{:n} or {:d}

Завдання

It's time for honing your skills!

  1. Convert number 12 from the hexadecimal numeral system to the decimal.
  2. Convert number 23 from the octal numeral system to the hexadecimal.
  3. Convert number 100 from the binary numeral system to the octal.
  4. Convert number 900 from the decimal numeral system to the binary.

Завдання

It's time for honing your skills!

  1. Convert number 12 from the hexadecimal numeral system to the decimal.
  2. Convert number 23 from the octal numeral system to the hexadecimal.
  3. Convert number 100 from the binary numeral system to the octal.
  4. Convert number 900 from the decimal numeral system to the binary.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 4. Розділ 3
toggle bottom row

Converting Using Format Method

I appreciate your desire to study 👏 if you are here, it means you are motivated a lot.

The last push of studying numeral systems is learning the format method for strings to convert numbers to different numeral systems.

format() allows you to do the complex substitution, but it goes beyond this course; hence, here you are going to get acquainted with converting numbers using this method. By the way, it is an opportunity for you to pick up the one that you prefer.

This example shows you how decimal numbers can be converted to other numeral systems.

  • {:b} is used to define the binary numeral system;
  • {:o} or {:O} (both ways are acceptable) is used to define the octal numeral system;
  • {:X} (the hexadecimal number must be defined using uppercase letters) or {:x}(the hexadecimal number must be defined using lowercase letters) is used to define the hexadecimal numeral system.

Subsequently, you should use the following syntax:
{:numeral_system_format}.format argument). This method has a significant benefit it prints your number without 0b, 0o, 0x, only converted number. But unfortunately to convert not decimal numbers you should write 0b, 0o or 0X. The decimal converting is diverse you can use 3 methods 😃: {},{:n} or {:d}

Завдання

It's time for honing your skills!

  1. Convert number 12 from the hexadecimal numeral system to the decimal.
  2. Convert number 23 from the octal numeral system to the hexadecimal.
  3. Convert number 100 from the binary numeral system to the octal.
  4. Convert number 900 from the decimal numeral system to the binary.

Завдання

It's time for honing your skills!

  1. Convert number 12 from the hexadecimal numeral system to the decimal.
  2. Convert number 23 from the octal numeral system to the hexadecimal.
  3. Convert number 100 from the binary numeral system to the octal.
  4. Convert number 900 from the decimal numeral system to the binary.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

I appreciate your desire to study 👏 if you are here, it means you are motivated a lot.

The last push of studying numeral systems is learning the format method for strings to convert numbers to different numeral systems.

format() allows you to do the complex substitution, but it goes beyond this course; hence, here you are going to get acquainted with converting numbers using this method. By the way, it is an opportunity for you to pick up the one that you prefer.

This example shows you how decimal numbers can be converted to other numeral systems.

  • {:b} is used to define the binary numeral system;
  • {:o} or {:O} (both ways are acceptable) is used to define the octal numeral system;
  • {:X} (the hexadecimal number must be defined using uppercase letters) or {:x}(the hexadecimal number must be defined using lowercase letters) is used to define the hexadecimal numeral system.

Subsequently, you should use the following syntax:
{:numeral_system_format}.format argument). This method has a significant benefit it prints your number without 0b, 0o, 0x, only converted number. But unfortunately to convert not decimal numbers you should write 0b, 0o or 0X. The decimal converting is diverse you can use 3 methods 😃: {},{:n} or {:d}

Завдання

It's time for honing your skills!

  1. Convert number 12 from the hexadecimal numeral system to the decimal.
  2. Convert number 23 from the octal numeral system to the hexadecimal.
  3. Convert number 100 from the binary numeral system to the octal.
  4. Convert number 900 from the decimal numeral system to the binary.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Секція 4. Розділ 3
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
We're sorry to hear that something went wrong. What happened?
some-alt