Convert 111001101110112 to Hexadecimal
They are 14 digits altogether, Grouping them into four's
we have:
00112 / 10012 / 10112 / 10112
Table: A-1010, B-1011, C-1100, D-1101, E-1110, F-1111
00112 --- 3 (Conversion to Hex)
10012 --- 9 (Conversion to Hex)
111001101110112 = 3 9 B B h
Conversion of the above: 11100110111011
Conversion to Base 10
1*2 13 + 1*2 12 + 1*2 11+ 0*2 10 + 0*2 9+ 1*2 8+ 1*2 7+ 0*2 6+ 1*2 5+ 1*2 4+ 1*2 3+ 0*2 2+ 1*2 1
+ 1*20 = 1 4 7 7 910
Conversion to Base 16 , Hexadecimal
1 4 7 7 9 | 1 6 | Remainder | 9 2 3 | 16 | 11 | 57 | 16 | 11 | 3 | 16 | 9 | | 0 | 3 | = 3 9 11 11 16 OR 3 9 B B h
QUESTION 2: Write a short note on record representation and array representation :
An array: is a collection of data types whose members are all the same type. The base addresses of the first element on the array and always appears in the lowest memory location.
The second array element directly follows the first in memory; and so on. However, it is not important that the indices start at zero; they may start with any number as long as they may start with any number as long as they are contiguous.
Record representation:
Just like record representation in other programming language like Pascal which support the use of different sized field item.
The same record is implemented in assembly language by first defining its composition then creates the record which has the composition of the previous record definition.
Each field of record is accessed by a similar method as to that of any other language like Pascal access the left field of the record.
QUESTION 3: How will you assemble your code in MASM?
Steps: Install the MASM software on your pc Use notepad as text editor Type your assembly code on the text editor and save it in the “\bin” directory of the *.asm. For