Computer Basics -2024

Wish you a Very Happy New Year !

Here is my first post in this new website. It is for anyone who is interested to learn Computer Basics. It can help any 10+ standard student.

How 2024 will be stored in computer memory ?

  Computer store numbers in binary. Binary numbers are created just using 0 and 1 . Our normal Decimal system use 0 to 9. We all know that digit position will be multiplied by 1, 10, 100, 1000 etc starting from rightmost Least Significant Digit(LSD)

Similarly binary numbers are multiplied by 1, 2 , 4 , 8 etc. from rightmost Least significant bit. Here underscore(_) is used for better readability.

2024 binary = 0111_1110_1000

Let me take a simple example to calculate binary of 23 . There is another number system Hexadecimal(6+10=16 digits) which uses digits from 0 to 9 , A, B, C, D, E, F . Here multiplier will be 1, 16 , 256 etc from rightmost LSD. It is like 16^0 , 16^1 , 16^2

Maximum hexadecimal digit is 0xF which is equivalent to 15 in decimal and 1111 in binary. Four bit combination of binary is called Nibble which is half of Byte(8 bits) .

So hexadecimal number of 23 = 0x17 ( = 1*16 + 7*1 = 23) . 0X is used for Hexadecimal numbers.

So binary of 23 (decimal) or 0x17 will be 0001_0111 . Here you can see each nibble is written separately.

Can we see contents of computer memory ?

Yes, you can check the memory contents either using program or some tools. Following is from my x86-64 based device in Little endian mode. Here 2024 is allocated 4 bytes , so it’s big endian is 0x0000_07E8 and little endian is just with reverse byte order i.e. 0xE807_0000 .

Little Endian : Least Significant Byte (right most) is stored in memory first and then rest follows in order till Most Significant Byte

Author

Sanjay Adhikari

Follow on LinkedIn

1 thought on “Computer Basics -2024”

  1. Pingback: Embedkari Experience - Embedkari

Leave a Reply

error: Content is protected !!
Scroll to Top

Discover more from

Subscribe now to keep reading and get access to the full archive.

Continue reading