Integer parsing requires multiplication by 10, which in Base-10 is easy as you can just add a zero at the end. But in binary you can’t do this, as that would be multiplying by 2. So you need to get a bit more creative when multiplying by a known amount in binary.
The code below shows how a number, ‘abc’ can be expressed as 100a + 10b + c. This is real code from my Crawssembly compiler written in Crawssembly.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.