Bitwise calculator
Bitwise operations combine two values bit by bit. EMV bit fields such as the TVR are read and built this way, and cryptographic calculations mix blocks of data with XOR.
Use it to check which bits two values share, to switch bits on or off with a mask, or to XOR two blocks while you follow a calculation by hand.
AND keeps the bits on in both values, OR keeps the bits on in either, XOR keeps the bits that differ, and NOT inverts every bit of the first value. Both values must have the same number of bytes, except for NOT, which uses only the first one.
Worked example: the TVR 80 00 00 00 00 AND the mask 80 00 00 00 00 gives 80 00 00 00 00, so byte 1, bit 8 is set. With a TVR of all zeros, the same AND gives all zeros.
New to EMV? Read EMV in 5 minutes or browse the glossary
Everything runs in your browser. Nothing you enter leaves this page.
AND, OR, and XOR bit by bit
XOR is the operation behind many payment calculations, such as building a PIN block or joining key components.