# Programmer calculator: hex, binary and bitwise

> Convert between hex, decimal, octal and binary and run bitwise AND, OR, XOR, NOT and shifts in 8 to 64-bit words. A free programmer calculator that flags overflow.

HTML: https://funworks.app/en/mathi/programmer-calculator/

*Tools*

One number in HEX, DEC, OCT and BIN at once, with bitwise operations, shifts and word sizes from 8 to 64 bits.

## 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

1. Set the word size to 8 bits and enter numbers in HEX.
2. Enter FF, choose AND, then enter 0F.
3. Read the result: 0F in hex, 15 in decimal, 00001111 in binary.

## Example

FF AND 0F, 8 bits = 0F

## 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 calculator: hex, binary and bitwise” free?**

Yes. “Programmer calculator: hex, binary and bitwise” 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 calculator: hex, binary and bitwise” 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 calculator: hex, binary and bitwise”?**

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.

[Mathi: Scientific Calculator](https://funworks.app/en/mathi/) · Coming soon to the App Store (2026-11-18)

---
FunWorks · https://funworks.app/en/ · support@funworks.app
