Why is "0x55aa" the name of this blog?

Why is this the name of this blog? What does it mean? Today we are going to be answering those questions.

55aa is the "boot signature" for the bootsector. This can be confusing.

A boot sector is the part of a persistent data storage device(ex. a hard disk) which contains machine code to be loaded to the RAM(Random Access Memory) and then executed. But how does the computer know that it is a bootsector? That's where the boot signature comes in. The computer only checks the first 512 bytes of the storage, and if it ends in "55aa", it recognizes it as a boot sector, so it moves it to the RAM and executes it.

But why  "55aa" and not any other number? Well, the answer is very simple. "55aa" is an hexadecimal number(that's why we write "0x" at the start, to tell the computer that we are writing a number in hex), and in decimal it is 21 930. And in binary it's 0101 0101 1010 1010(again, before that we must put 0b, so the computer recognizes it's in bynary), which seemed like a nice pattern, so that's why it was chosen.

In conclusion, to make a working boot sector we only need to fill 510 with nothing, and the remaining 2 bytes(remember, 1 byte=8 bits, so 2 bytes=16 bits) with 0x55aa.

Comments

Post a Comment

Popular posts from this blog

Practical guide on making a bootloader

Why are computer "bugs" called that way?