Skip to main content

New answers tagged

3 votes

Optimizing Masked Bit Shifts of Gray Code with AND Operation and Parity Count

This function is faster, but it crashes in the corner case where SHIFT_MASK == 0 because it loses the least significant bit. This issue can be resolved by zero ...
wepajakeg's user avatar
  • 113
7 votes
Accepted

Optimizing Masked Bit Shifts of Gray Code with AND Operation and Parity Count

Latency analysis The "generic" (not specific to any particular microarchitecture) latency analysis you did is not bad. There are some extra quirks though: ...
user555045's user avatar
  • 10.7k
6 votes

Optimizing Masked Bit Shifts of Gray Code with AND Operation and Parity Count

CPUs are much more complex Level 8: ret You are looking at the instructions from the stand-alone functions, but those are never actually ...
G. Sliepen's user avatar
  • 61.7k
3 votes

A PicoBlaze assembly program that converts binary numbers to octal

Name all the registers namereg s0, switches namereg sa, last_digits namereg sc, first_digit input switches, 0 Two lefts equal six rights For the most significant ...
RootTwo's user avatar
  • 10.2k
5 votes
Accepted

A PicoBlaze assembly program that converts binary numbers to octal

masking sub s0, 300'o less_than_300: That wasn't obvious to me. Wouldn't the relevant magic number be 377'o, instead? And why ...
J_H's user avatar
  • 34.8k

Top 50 recent answers are included