Binary & Hexadecimal
Embedded hardware represents and manipulates information as bits. Binary makes individual bits explicit, while hexadecimal provides a compact representation of groups of four bits.
CORE IDEA
Binary digits are 0 and 1
ENGINEERING VIEW
One hexadecimal digit represents four bits
WHAT TO CHECK
Bit masks are normally written in hexadecimal
REMEMBER
Convert values before changing register fields
Engineer’s checklist
- Binary digits are 0 and 1
- One hexadecimal digit represents four bits
- Bit masks are normally written in hexadecimal
- Convert values before changing register fields
KEY TAKEAWAY
Digital behavior is physical behavior. When firmware and expectations disagree, measure the signal instead of guessing.