![]() You may not meet the mod function or operator in the course of learning to program, but once you start to write real code you will certainly meet it. Once you get away from the representation of numbers as bit strings and arithmetic via registers then many mod and remainder operations lose their immediate meaning so familiar to assembly language programmers. You find it in the way numbers are represented in binary and in machine code or assembly language instructions. Modular arithmetic used to be something that every programmer encountered because it is part of the hardware of every machine. Many programmers are puzzled by the mod, short for modulo, and integer division functions/operators found in nearly all languages. Not only is it the basis for many an algorithm, it is part of the hardware. The answer any experienced programmer should give you is "a lot". What has modular arithmetic got to do with the real world?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |