BeebMaster

Working with Hexadecimal




Sometimes it can be useful - even essential - to be able to take a number that is larger than a byte long and extract the individual bytes from it. Let's start with the basics of MOD and DIV.

DIV divides the first number by the second and gives the whole number result. MOD divides the first number by the second and gives the remainder. You know, like when you learn division at school. So, 10 divided by 3 = 3 remainder 1. 10 DIV 3 gives the whole number result of 3, and 10 MOD 3 gives the remainder of 1.



Click here to return to Hex