0% found this document useful (0 votes)
30 views1 page

Understanding Binary and Decimal Conversion

The document discusses two types of programming languages: Low Level and High Level. Low Level Programming Languages use binary, octal, and hexadecimal data that are not easily understandable by users, while High Level Programming Languages like Python convert these formats into more user-friendly decimal numbers. Examples demonstrate how Python handles different number systems and outputs them in a readable format.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views1 page

Understanding Binary and Decimal Conversion

The document discusses two types of programming languages: Low Level and High Level. Low Level Programming Languages use binary, octal, and hexadecimal data that are not easily understandable by users, while High Level Programming Languages like Python convert these formats into more user-friendly decimal numbers. Examples demonstrate how Python handles different number systems and outputs them in a readable format.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

=======================================

High Level Programming


=======================================
=>In this context, we have two types of languages. They are

1. Low Level Programming Languages


2. High Level Programming Languages
-----------------------------------------------------------------
1. Low Level Programming Languages:
-----------------------------------------------------------------
=>In Low Programming Languages, data is always stored in the form of low level
values such as Binary data, Octal Data and Hexa Decimal data. These Number Systems
are not directly understandable by end-users .

Example : a=0b1010101010----Binary Data


b=0xBEE--------------Hexa Decimal Data
c=0o23-----------------Octal Data
-----------------------------------------------------------------
2. High Level Programming Languages
-----------------------------------------------------------------
=>In these languages, Internally, Even the programmer specifies the data in the
form of Low Level Format such as Binary data, Octal Data and Hexa Decimal data,
automatically Python Programming Language Execution Environment Converts into High
Level data such as Decimal Number System, which is understandable by end-users .
Hence Python is one of the High Level Programming Language.
------------------
Examples:
----------------
>>> a=0b101010111110000
>>> b=0b10101111000
>>> print(a)-----------------------22000
>>> print(b)----------------------1400
>>> a=0xBEE
>>> print(a)-----------------------3054
>>> a=0o17
>>> print(a)---------------15
>>> bin(22000)-----------------'0b101010111110000'
>>> hex(3054)----------------'0xbee'
======================================x============================================
============

You might also like