Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
en:multiasm:cs:chapter_3_8 [2026/01/10 10:51] pczekalskien:multiasm:cs:chapter_3_8 [2026/01/10 20:14] (current) pczekalski
Line 27: Line 27:
 From the processor's perspective, instructions are binary codes that unambiguously determine the activities the processor is to perform. Instructions can be encoded using a fixed or variable number of bits. From the processor's perspective, instructions are binary codes that unambiguously determine the activities the processor is to perform. Instructions can be encoded using a fixed or variable number of bits.
  
-A fixed number of bits makes the construction of the instruction decoder simpler because the choice of some specific behaviour or function of the execution unit is encoded with the bits, which are always at the same position in the instruction. On the opposite side, if the designer plans to expand the instruction set with new instructions in the future, there must be some spare bits in the instruction word reserved for future use. It makes the program's code larger than necessary. Fixed-length instructions are often implemented on RISC machines. For example, in the ARM architecture, instructions have 32 bits. In AVR, instructions are encoded using 16 bits.+A fixed number of bits makes the construction of the instruction decoder simpler because the choice of some specific behaviour or function of the execution unit is encoded with the bits, which are always at the same position in the instruction. On the opposite side, if the designer plans to expand the instruction set with new instructions in the future, there must be some spare bits in the instruction word reserved for future use. It makes the program's code unnecessarily large. Fixed-length instructions are often implemented on RISC machines. For example, in the ARM architecture, instructions have 32 bits. In AVR, instructions are encoded using 16 bits.
  
 A variable number of bits makes the instruction decoder more complex. Based on the content of the first part of the instruction (usually a byte), it must be able to decide what is the length of the whole instruction. In such an approach, instructions can be as short as one byte or much longer. An example of a processor with variable instruction length is the 8086, and all subsequent processors in the x86 and x64 families. Here, the instructions, including all possible constant arguments, can be as long as 15 bytes. A variable number of bits makes the instruction decoder more complex. Based on the content of the first part of the instruction (usually a byte), it must be able to decide what is the length of the whole instruction. In such an approach, instructions can be as short as one byte or much longer. An example of a processor with variable instruction length is the 8086, and all subsequent processors in the x86 and x64 families. Here, the instructions, including all possible constant arguments, can be as long as 15 bytes.
en/multiasm/cs/chapter_3_8.1768035071.txt.gz · Last modified: 2026/01/10 10:51 by pczekalski
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0