mirror of
https://github.com/johnwinans/rvalp.git
synced 2025-09-28 21:50:38 -04:00
Zeroes is a verb :-/
This commit is contained in:
parent
169ed5f4b3
commit
04cd1ee42c
@ -88,7 +88,7 @@ magnitude of the desired number.
|
|||||||
Another item worth noting is that any even binary number will always
|
Another item worth noting is that any even binary number will always
|
||||||
have a 0 LSB and odd numbers will always have a 1 LSB.
|
have a 0 LSB and odd numbers will always have a 1 LSB.
|
||||||
|
|
||||||
As is customary in decimal, leading zeroes are sometimes not shown
|
As is customary in decimal, leading zeros are sometimes not shown
|
||||||
for readability.
|
for readability.
|
||||||
|
|
||||||
The relationship between binary and hex values is also worth taking
|
The relationship between binary and hex values is also worth taking
|
||||||
@ -149,7 +149,7 @@ $00011011_2$ represents the decimal value $27_{10}$.
|
|||||||
Conversion from binary to hex involves grouping the bits into
|
Conversion from binary to hex involves grouping the bits into
|
||||||
sets of four and then performing the same summing process as
|
sets of four and then performing the same summing process as
|
||||||
shown above. If there is not a multiple of four bits then
|
shown above. If there is not a multiple of four bits then
|
||||||
extend the binary to the left with zeroes to make it so.
|
extend the binary to the left with zeros to make it so.
|
||||||
|
|
||||||
Grouping the bits into sets of four and summing:
|
Grouping the bits into sets of four and summing:
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ Zero extend {\em val} to the right.
|
|||||||
Some times a binary value is encoded such that a set of bits represented
|
Some times a binary value is encoded such that a set of bits represented
|
||||||
by {\em val} are used to represent the \acrshort{msb}s of some longer (more bits)
|
by {\em val} are used to represent the \acrshort{msb}s of some longer (more bits)
|
||||||
value.
|
value.
|
||||||
In this case it is necessary to append zeroes to the right to convert \verb@val@ to
|
In this case it is necessary to append zeros to the right to convert \verb@val@ to
|
||||||
the longer value.
|
the longer value.
|
||||||
|
|
||||||
\autoref{Figure:ZeroRightExtend} illustrates converting a 20--bit {\em val} to
|
\autoref{Figure:ZeroRightExtend} illustrates converting a 20--bit {\em val} to
|
||||||
@ -570,7 +570,7 @@ Load Upper Immediate.
|
|||||||
\verb@rd@ $\leftarrow$ \verb@zr(imm)@
|
\verb@rd@ $\leftarrow$ \verb@zr(imm)@
|
||||||
|
|
||||||
Copy the immediate value into bits 31:12 of the destination register and
|
Copy the immediate value into bits 31:12 of the destination register and
|
||||||
place zeroes into bits 11:0.
|
place zeros into bits 11:0.
|
||||||
When XLEN is 64 or 128, the immediate value is sign--extended to the left.
|
When XLEN is 64 or 128, the immediate value is sign--extended to the left.
|
||||||
|
|
||||||
Instruction Format and Example:
|
Instruction Format and Example:
|
||||||
@ -992,7 +992,7 @@ Store Word
|
|||||||
\verb@m16(rs1+sx(imm))@ $\leftarrow$ \verb@rs2[31:0]@\\
|
\verb@m16(rs1+sx(imm))@ $\leftarrow$ \verb@rs2[31:0]@\\
|
||||||
\verb@pc@ $\leftarrow$ \verb@pc+4@
|
\verb@pc@ $\leftarrow$ \verb@pc+4@
|
||||||
|
|
||||||
Store the 32-bit value in \verb@rs1@ into memory at address \verb@rs2+imm@.
|
Store the 32-bit value in \verb@rs1@ into memory at address \verb@rs1+imm@.
|
||||||
|
|
||||||
Encoding:
|
Encoding:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user