By Zachary Long

Mod, why it’s useful, how to use it, and how it works.

It’s useful for conversion from binary to decimal, or any other number such as octonary.

Mod is a mathematical equation in which you divide a number by for example two and if there is a reminder you get one if nothing remains you get zero. It can be used in a verity of ways for example binary conversion.

This is an example that returns one:

Image of a program that converts binary to decimal and decimal to binary:

An image of how to use mod for binary conversion:

Mod works by dividing your number by a specified number, such as 2 for binary, if there is a remainder, it is added to a string, if not, a zero is added, this goes on until the original number is 0.

Mod can be used to determine if a number is even or odd.

Leave a Reply

Your email address will not be published. Required fields are marked *