21524474-Computer-Organization-Articture-No-11-from-APCOMS

21524474-Computer-Organization-Articture-No-11-from-APCOMS...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
COA by Athar Mohsin Lecture 12 Instruction set architecture
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
COA by Athar Mohsin Instruction Formats Instruction sets are differentiated by the following: Number of bits per instruction. Stack-based or register-based. Number of operands per instruction. Operand location. Types of operations. Type and size of operands. Instruction set architectures are measured according to: Main memory space occupied by a program. Instruction complexity. Instruction length (in bits). Total number of instructions in the instruction set.
Background image of page 2
COA by Athar Mohsin Instruction Formats In designing an instruction set, consideration is given to: Instruction length. – Whether short, long, or variable. Number of operands. Number of addressable registers. Memory organization. – Whether byte- or word addressable. Addressing modes. – Choose any or all: direct, indirect or indexed. Byte ordering, or endianness , is another major architectural consideration. If we have a two-byte integer, the integer may be stored so that the least significant byte is followed by the most significant byte or vice versa. In little endian machines, the least significant byte is followed by the most significant byte. Big endian machines store the most significant byte first (at the lower address).
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
COA by Athar Mohsin As an example, suppose we have the hexadecimal number 12345678. The big endian and small endian arrangements of the bytes are shown below. Instruction Formats
Background image of page 4
COA by Athar Mohsin Any program that writes or reads data from a file must be aware of the byte ordering on the particular machine. For example, the Windows BMP graphics format was developed on a little endian machine, • To view BMPs on a big endian machine, the application used to view them must first reverse the byte order Software designers of popular software must be aware of these byte- ordering issues. • Adobe Photoshop uses big endian, • GIF is little endian, • JPEG is big endian, PC Paintbrush is little endian, RTF by Microsoft is little endian, and Sun raster files are big endian. Some applications support both formats: Microsoft WAV and AVI files, TIFF files, and XWD (X windows Dump) support both, typically by encoding an identifier into the file.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
COA by Athar Mohsin Problem if you wished to transfer data from a big endian machine to a little endian machine? If the machines receiving the data uses different endian- ness than the machine sending the data, the values can be misinterpreted. For example, the value sent as the -511 on a big endian machine, would be read as the value 510 on a little endian machine.
Background image of page 6
Example The first two bytes of a 2M x 16 main memory have the following hex values: Byte 0 is FE Byte 1 is 01 If these bytes hold a 16-bit two's complement integer, what is its actual decimal value if: a. memory is big endian?
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 32

21524474-Computer-Organization-Articture-No-11-from-APCOMS...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online