r/computerscience • u/ShadowGuyinRealLife • May 05 '26
Discussion Real Mode 20 Bits
x86 processors have a mode known as "real mode" where physical memory is straight mapped. So if I'm interpreting what I read correctly an instruction to load the value at location 1000 into a register would fetch the value at the position 1000 in memory and put it into the register. This is limited to 20 bits of addressing. I read this was due to backward compatibility to the 8086 which lacked a protected mode. If a 32-bit processor uses 32 bits for addressing, why would the real mode be 20 bits? If real is for backwards compatibility with older processors, shouldn't it be 16 bits since the 8086 was a 16-bit?
On the advice of a mod, certain information was omitted for posting so my question may be unclear but I hope you can understand.
View all comments
Show parent comment
1
u/ShadowGuyinRealLife May 27 '26
Would using 32 (or any multiple of 16) bits have any advantages to a machine that only has enough physical memory 20 bit-address? You mentioned 16 wouldn't be enough.
(hi<<16)+loHas the disadvantage of wasting traces. Does it have any advantages of... I don't know making it easier for compilers (or programmers) to do addressing or anything? Or is the benefit of being a multiple of 16 just something that looks nice but doesn't actually help?