From the course: Getting Started with RISC-V

Unlock the full course today

Join today to access over 24,200 courses taught by industry experts.

Instruction encoding

Instruction encoding

- [Instructor] Another change in the way things were done that was introduced by risk, is the instruction encoding. The number of bits associated with a processor is the number of bits in its registers. This dictates the size of pretty much everything else in the system. Commercial CISC processors started with 8-bit registers, so the instructions stored in memory were encoded in bytes. Now having a large instruction set, eight bits fell short for the encoding of instructions as it would only allow for 256 possible instructions. That's why CISC processors relied on encoding instructions with multiple bytes in memory. For example, an addition instruction could be encoded with one byte to specify the operation. This field is known as the operation code or OP code. Then the instruction would require two operands to be specified in two separate bytes. These bytes could contain a memory address each, and one of them could serve as an…

Contents