From the course: Certified Entry-Level Python Programmer (PCEP-30-02) Cert Prep

Unlock the full course today

Join today to access over 24,500 courses taught by industry experts.

Defining numerical representations

Defining numerical representations

- [Presenter] Let's talk a little bit about numerical representations. So littles for numbers, let's start talking about integer numbers. So the int type. We can express integer numbers in the decimal notation. That's typically the standard one. For example, if you say three or minus 89, that's the decimal notation. We can also use the binary notation. In this case, we use zero B as a prefix, and then the binary number. So we can only use zeros and ones. We also have the octal notation, that in python, it's zero, lowercase o for octal. And then the number that should contain the sheets only from zero to seven. And finally, we have the hexadecimal notation. That is zero x and the digits. In this case, digits will go from zero to nine, adding A, B, C, D, E, and F as possibilities because we need 16 digits to represent addition. To convert from binary to decimal. This is how it works. This is the formula. Let's…

Contents