Constructing bit fields

Factor handbook » The language » Numbers » Arithmetic » Bitwise arithmetic » Additional bitwise arithmetic

Factor handbook » The language » Numbers » Arithmetic » Bitwise arithmetic » Additional bitwise arithmetic

Prev: | >signed ( x n -- y ) |

Some applications, such as binary communication protocols and assemblers, need to construct integers from elaborate bit field specifications. Hand-coding this using shift and bitor results in repetitive code. A higher-level facility exists to factor out this repetition:

bitfield ( bitspec -- quot )

This documentation was generated offline from a
`load-all`

image. If you want, you can also
browse the documentation from within the UI developer tools. See
the Factor website
for more information.

Factor 0.100 x86.64 (2250, heads/master-3623a4e0d7, Nov 15 2023 18:16:06)