Word to Bits
Libraries:
HDL Coder /
Logic and Bit Operations
Description
The Word to Bits block converts a real number of word length N to a vector of bits. The output of the block is a vector whose length you specify in the Maximum Word Length parameter.
The block treats the first element of the output vector as the least significant bit (LSB) and treats subsequent bits as the next significant bits in ascending order.
This figure shows the conversion of the unsigned integer 72 to its binary representation when you specify a maximum word length of 8. You can also convert a signed integer value to its corresponding binary vector.
This figure shows the conversion of the non-integer value 5.5 to its binary
representation. The output is a binary representation of the stored integer value of 5.5. To
determine stored integer value of a fixed-point real number, use storedInteger
function.