Skip to content

Binary manipulation in Forth #74

Answered by tabemann
ctrilsbach asked this question in Q&A
Discussion options

You must be logged in to vote

For single-cell integers there are lshift, for shift left, rshift, for shift right (i.e unsigned shift right), and arshift, for arithmetic shift right (i.e. signed shift right).

For double-cell integers there are 2lshift, for shift left, and 2rshift, for shift right (i.e. unsigned shift right). There is also 2arshift, but I found a significant bug when I was testing it this morning, so it will need more work.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ctrilsbach
Comment options

@tabemann
Comment options

Answer selected by ctrilsbach
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants