AND Hex Numbers
Quickly calculate bitwise AND of a bunch of hex numbers. Runs entirely in your browser, so your data never leaves your device.
Runs on your device, nothing uploaded
0 chars · 0 lines
Output
Quickly calculate bitwise AND of a bunch of hex numbers.
Type or paste above to see the result here.
What you paste never leaves this tab
AND Hex Numbers is JavaScript that your browser has already downloaded, and it does the whole job on your own machine. On a normal site, whatever you type in is sent to a server that can log it, cache it or keep it. Here it is read and transformed inside this tab and nowhere else.
- No upload
- No length limit
- Works offline once loaded
- Nothing stored or logged
How to use AND Hex Numbers
- 1. Enter two or more hex values. Paste the hexadecimal operands into the input pane separated by spaces or newlines. Order does not matter for AND, and mixed case or 0x prefixes are handled without complaint.
- 2. Understand the result. A bit survives only if it is set in every operand, so ff AND 0f gives 0f: the upper nibble is cleared and the byte width is kept. The bit strip lines the operands up in binary with the result underneath, and the answer shows the decimal value.
- 3. Copy the masked value. Grab the resulting hex number from the output pane. Paste it into your source, a register write command or a calculation you are documenting.
When to use AND Hex Numbers
AND Hex Numbers exists for mask work: intersecting bit flags, isolating fields and clearing bits without firing up a programming REPL. Because bitwise AND keeps only the bits common to every operand, it answers questions like 'which flags are set in both values' in one paste.
- Extracting a bitfield from a register. A datasheet says bits 4 to 7 hold the mode. AND the raw register dump with f0 to isolate that field before shifting, and confirm the mode your firmware actually latched.
- Comparing permission flags. Two processes report capability masks in hex. ANDing them shows the privileges they share, which is exactly what you need when debugging why an operation works for one and not the other.
- Checking subnet membership manually. AND a hex-encoded IPv4 address with the netmask and compare against the network address. It is a fast way to settle whether a host belongs to a route during an incident.
- Verifying mask constants in code review. A pull request defines FLAG_A & FLAG_B inline as a literal. Recompute the AND here and confirm the hardcoded constant matches before approving the change.
Examples
AND two hex numbers
Input
ff 0f
Output
0f
AND a byte pair
Input
cc aa
Output
88
About the AND Hex Numbers tool
AND Hex Numbers does its work locally, right in the browser. Quickly calculate bitwise AND of a bunch of hex numbers. There is no upload step, no queue and no account, and your data never travels over the network.
It belongs to the Hex Tools collection on EditSafely, a set of 108 small, focused Hex utilities that share the same instant, private workspace.
You can shape the output with 2 settings, including Width and Keep leading zeros (widest operand's width), and the result refreshes the moment you change one. 2 worked examples further down the page show exactly what the tool produces for real inputs.
Running locally also makes the tool fast and dependable: results appear as soon as your input does, there is no server outage that can take it down mid-task, and confidential data can be processed without a second thought.
Frequently asked questions
Is AND Hex Numbers free to use?
Yes, it is completely free. All 2,943 tools on EditSafely work without an account, a subscription or usage limits.
Is it safe to paste sensitive or confidential data?
Everything happens locally. Your browser downloads the tool's code once, then does all the processing itself; nothing you enter is transmitted, stored or logged. You can even go offline after the page loads and it will still work.
How much text can I process at once?
There is no fixed limit; your device's memory is the ceiling. Up to 10 MB the result updates as you type, after a short pause that grows with the size. Above 10 MB a Run button appears so typing stays smooth, and files open up to 50 MB. A very long result shows its first 2,000 lines on screen, while Copy and Download always include all of it.
Do I need to sign up or install anything?
No. The tool works in any modern browser on desktop, tablet or phone. There is no account to create, no extension to add and no software to install.
How do I use the result?
The output panel has a one-click copy button, and you can keep refining the input while you work; the result updates in place as you type.
Related tools
All Hex Tools →OR Hex Numbers
Quickly calculate bitwise OR of a bunch of hex numbers.
XOR Hex Numbers
Quickly calculate bitwise XOR of a bunch of hex numbers.
NAND Hex Numbers
Quickly calculate bitwise NAND of a bunch of hex numbers (inverted within the widest operand's bit-width).
NOT Hex Numbers
Calculate bitwise NOT of hexadecimal numbers (each inverted within its own bit-width).