Skip to main content

Posts

Showing posts from September 10, 2020

Number System in Python

  Python generally supports integers, fractional values and complex numbers and we have data types for them like int for integers, float for fractional values, and complex for complex numbers, we can understand that but if our computer wants to perform certain operations on bits or some other operations then we need to convert them into some number systems like binary, octal, hexadecimal. These are the three different number systems. Number conversions are used in programming languages because we cannot directly use some operators like bit-wise operators, we need to convert decimals into binary and sometimes we need to convert binary format of a number to decimal, so we use number conversions there Actually, number conversions are done on 4 types 1.       Decimal 2.       Binary 3.       Octal 4.       Hexadecimal 1. Decimal to binary:                               Binary – which means 2, we can only use 2 digits 0 and 1 so we call them as binary digits nothing but bits.

Contact form

Name

Email *

Message *