22.
DB | Define Byte | allocates 1 byte |
DW | Define Word | allocates 2 bytes |
Following are the points to take in mind while allocating
Let say starting byte is 1001
TSU_ENGINEERING DB 'Y' // ASCII of y = 79 H , this will assign 1 byte to it i.e. 1001
NUMBER DW 45066 // 45066D = B00A H , this will assign 2 byte i.e. 1002-1003
NEG_NUMBER DW -45066 // -45066D = 4FF6 H (2 COMPLIMENT OF -45066d = 20470D) ,this will assign 2 byte i.e. 1004-1005
so DB - 1001
DW - 1002-1003
DW - 1004-1005
Each byte of character is stored as its ASCII value in hexadecimal.
Each decimal value is automatically converted to its 16-bit binary equivalent and stored as a hexadecimal number.
Negative numbers are converted to its 2's complement representation.
Short and long floating-point numbers are represented using 32 or 64 bits, respectively.
22) Explain how storage space allocated for initialized data by the following instructions TSU ENGINEERING DB...