Consider the following segment address 0xB0000 as this is a 20 bit address this is stored in segment register(16bit) as 0xB000
and let the offset address be 0x8000 which will be in the offset register
and now segment:offset address is
0xB000:0x8000
then when converting what will be the 20bit address??
The "absolute" address that corresponds to the segment:offset address B000h:8000h is B8000h. To do the conversion you shift the segment address left by 4 bits and add it to the offset address.
The absolute address you gave is only 20bit But in programs like C we need to provide 32bit address for the compiler.How to convert it to 32 bit address?
The conversion I specified is for real mode. For normal real mode where you have 16-bit segment addresses and 16-bit offset addresses, you get 20-bit absolute addresses. You normally encounter 32-bit addresses only for protected mode. Under Windows you ignore the values in the segment registers and use 32-bit offset addresses.