Click here to Skip to main content
15,891,763 members
Articles / Programming Languages / C++

Multiplicative Inverse mod-256 with No Division Operations

Rate me:
Please Sign up or sign in to vote.
3.67/5 (3 votes)
14 Jul 2022LGPL3 8.6K   2  
Find the multiplicative inverse mod-256 with no division operations
Targetting 8-bit CPUs with no division instruction (in hardware), this snippet finds the number X that, given N (both 8-bit unsigned) so that N*X=1 (mod 256).

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The GNU Lesser General Public License (LGPLv3)


Written By
Chief Technology Officer Software Union
Austria Austria
has been working a total of 14 years as programmer and system developer, plus some years of working as network technician and application supporter. Also experienced modeling, optimizing and administering FireBird and SqlServer databases. Loathes MySql.
Works with C++, C++/CLI, C#, JavaScript, PHP, PSQL and TextPad.

Comments and Discussions