Chapter1-bag2-mikroprocessor

878 views
818 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
878
On SlideShare
0
From Embeds
0
Number of Embeds
43
Actions
Shares
0
Downloads
15
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Chapter1-bag2-mikroprocessor

  1. 1. Computer Data Formats Microprocessor Course Electrical Engineering Department University of Indonesia
  2. 2. ASCII Data <ul><li>American Standard Code for Information Interchange (ASCII) data represent alphanumeric characters in the memory of a computer system ( Table 1.7 ) </li></ul><ul><li>The standard ASCII code is a 7-bit code with the eighth and MSB used to hold parity in some systems </li></ul><ul><li>ASCII are most often stored in memory using a special directive to the assembler program called define byte(s) or DB </li></ul>
  3. 3. BCD Data <ul><li>Binary-Coded Decimal (BCD) information is stored in either packed or unpacked forms </li></ul><ul><li>Packed BCD data are stored as two digits per byte </li></ul><ul><li>Unpacked BCD data are strored as one digit per byte </li></ul><ul><li>The range of a BCD digit extends from 0000 2 to 1001 2 or 0-9 decimal </li></ul><ul><li>Table 1.9 shows some decimal numbers converted to both packed ad unpacked BCD </li></ul>
  4. 4. Byte-Sized Data <ul><li>Byte-size data are stored as unsigned and signed integers </li></ul><ul><li>Negative signed numbers are stored in the 2’s complement form </li></ul><ul><ul><li>Whenever a number is 2’s complement, its sign changes from negative to positive or positive to negative </li></ul></ul><ul><ul><li>See example 1-22, 1-23 </li></ul></ul><ul><li>Define bit ( DB ) directive is used to store 8-bit data in memory </li></ul>
  5. 5. Word-sized Data <ul><li>A word (16-bits) is formed with two bytes of data </li></ul><ul><li>The LSB is always stored in the lowest-numbered memory location, the MSB in the highest (i.e., little endian format) -- used with Intel family of microprocessor </li></ul><ul><li>An alternate method (i.e., big endian format) is used with the motorolla family of micro-processors </li></ul>
  6. 6. Word-sized Data <ul><li>Fig 1.11(a) & (b) shows the weight of each bit position in a word of data </li></ul><ul><li>Example 1.25 shows several signed and unsigned word-sized data stored in memory using the assembler program </li></ul><ul><li>Note that define word(s) directive or DW causes the assembler to store words in the memory </li></ul>
  7. 7. Doubleword-sized Data <ul><li>Doubleword-sized data requires four bytes of memory (32-bit number) </li></ul><ul><li>Doubleword-sized data appear as a product after a multiplication and also as a dividend before a division </li></ul><ul><li>Fig. 1-12 shows the form used to store doublewords in the memory and the binary weights of each bit position </li></ul><ul><li>To define doubleword-sized data, use assembler directive define doubleword or DD </li></ul>
  8. 8. Real Numbers <ul><li>A real number (floating-point number) contains two parts: a mantissa, significand, or fraction and an exponent </li></ul><ul><li>Fig. 1-13 and example 1-27 depicts both the 4-byte ( single precision ) and 8-byte ( double precision ) forms of real numbers </li></ul><ul><li>The exponent is stored as a biased exponent </li></ul><ul><ul><li>an exponent of 2 3 is represented as a biased exponent of 127+3 or 130 (82H) in the single- precision form or as 1026 (402H) in the double-precision form </li></ul></ul>

×