PDF4PRO ⚡AMP

Modern search engine that looking for books and documents around the web

Example: quiz answers

Chapter 2 Instructions: Assembly Language

Chapter 2 Instructions: Assembly LanguageReading: The corresponding Chapter in the 2nd edition is Chapter 3, in the 3rd edition itis Chapter 2 and Appendix A and in the 4th edition it is Chapter 2 and Appendix Instructions and Instruction setThe Language to command a computer architecture is comprised ofinstructionsand thevocabulary of that Language is called theinstruction set. The only way computers can rep-resent information is based on high or low electric signals, , transistors (electric switches)being turned on or off. Being limited to those 2 alternatives, we represent information in com-puters usingbits(binary digits), which can have one of two values: 0 or 1. So, instructionswill be stored in and read by computers as sequences of bits. This is called machine make sure we don t need to read and write programs using bits, every instruction will alsohave a natural Language equivalent, called the Assembly Language notation. For example,in C, we can use the expressionc=a+b; or, in Assembly Language , we can useadd c,a,band these instructions will be represented by a sequence of bits 000000 010001001 in thecomputer.

lw $0, 32($3) # load A[8] to $0 add $0, $0, $2 # add h and $0 sw $0, 48($3) # store the sum in A[12] In the rst instruction, we use 32 as the o set since one integer is represented by 4 bytes, i.e., 4 memory cells, so the 8th element of the array …

Tags:

  Load, Cells

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Spam in document Broken preview Other abuse

Transcription of Chapter 2 Instructions: Assembly Language

Related search queries