Tools
Programmer calculator: hex, binary and bitwise
One number in HEX, DEC, OCT and BIN at once, with bitwise operations, shifts and word sizes from 8 to 64 bits.
Free
Try it right here
The web version of this mode is on its way. For now, it's waiting for you in the app.
What it does
The Programmer mode in Mathi shows every number in four bases at the same time: hexadecimal, decimal, octal and binary. Type in any of them and the other three follow, which makes it a quick hex to decimal or decimal to binary converter as well as a calculator.
Bitwise AND, OR, XOR and NOT, shifts and ordinary arithmetic work within the word size you choose, from 8 to 64 bits, signed or unsigned. When a result doesn't fit, Mathi says it was truncated instead of quietly showing a wrong number, and a bit panel shows how many ones there are and where the highest and lowest set bits are.
- HEX, DEC, OCT and BIN side by side
- AND, OR, XOR, NOT and bit shifts
- Word size from 8 to 64 bits, signed or unsigned
- An overflow warning instead of a silently wrong result
- Bit panel: the number of ones, the highest and lowest bit
How to use it
- Set the word size to 8 bits and enter numbers in HEX.
- Enter FF, choose AND, then enter 0F.
- Read the result: 0F in hex, 15 in decimal, 00001111 in binary.
Example

FAQ
How do I convert hex to decimal?
Type the number in the HEX row and read the DEC row: FF is 255, 7F is 127. Each hex digit stands for four bits, so FF in binary is 11111111.
What does AND do with FF and 0F?
It keeps a bit only where both numbers have a 1. FF is 11111111 and 0F is 00001111, so the result is 00001111, which is 0F, or 15.
Why does a negative number look so big in hex?
In signed mode negative numbers are stored in two's complement: −1 in an 8-bit word is FF, in 16 bits it's FFFF. Switch to unsigned to read the same bits as a positive number, 255.
Is “Programmer” free?
Yes. “Programmer” is free here on the site and in the Mathi app, with no ads and no time limit. The only paid part of Mathi is the AI solver, and even that gives you free tasks every day.
Does “Programmer” work offline and without an account?
In the app, yes: every calculator mode works without internet, and Mathi never asks you to sign up or log in. On this page the calculation also runs right in your browser.
What does the app add to “Programmer”?
The full version of the mode: “How it was solved” wherever a result can be explained, History of every result, copy and paste between apps, 46 designs, Home Screen widgets and offline work on iPhone, iPad and Mac.