MMIX LOGO

MMIX Instruction Set

Table of Content

Content

The SADD Instruction

Name:

SADD $X,$Y,$Z

Specification:
s($X) ← s(∑ (v($Y)&˜ v($Z)))

Timing:

SADD: υ

Description:

This instruction (Sideways Add) counts the number of bit positions in which $y has a 1 and $Z has a 0. The result is stored in $X.

SADD: Each bit of register $Y is logically anded with the complement of the corresponding bit of register $Z or of the constant Z, and the number of 1 bits in the result is placed in register $X. In other words, register $X is set to the number of bit positions in which register $Y has a 1 and the other operand has a 0; in symbols, $X = υ($Y \ $Z) or $X = υ($Y \ Z). When the second operand is zero this operation is sometimes called “population counting,” because it counts the number of 1s in register Y.

Please help to keep this site up to date! If you want to point out important material or projects that are not listed here, if you find errors or want to suggest improvements, please send email to email