#separator:tab
#html:true
#notetype:Basic
#tags column:3
#deck:cracked.guide::TAOCP Vol 2::4.1 Positional Number Systems
#columns:Front	Back	Tags
TAOCP §4.1 Positional Number Systems: what does it cover?	Number representations: binary, octal, hex, and exotic systems like negative bases, balanced ternary, and mixed radix. Knuth also covers a little history of how positional notation developed.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.1 cracked.guide::kind::about
TAOCP §4.1: why does it matter?	Bit manipulation, encodings and serialization formats all depend on fluent radix thinking. Mixed radix is how you convert time units and index multi-dimensional arrays.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.1 cracked.guide::kind::why
TAOCP §4.1, a common trap: “Rushing through the negative-base examples.” What's the catch?	They are fun and they check your understanding.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.1 cracked.guide::kind::trap
TAOCP §4.1, exercise 1 (rated 15): what is it asking?	Write small integers in base -2. Drill.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.1 cracked.guide::kind::exercise
TAOCP §4.1, exercise 9 (rated 15, recommended): what is it asking?	Octal to hexadecimal by regrouping bits.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.1 cracked.guide::kind::exercise
TAOCP §4.1, exercise 2 (rated 24, recommended): what is it asking?	Express a few numbers in four unusual systems. Shows the tradeoffs side by side.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.1 cracked.guide::kind::exercise
TAOCP §4.1, exercise 11 (rated 22): what is it asking?	Design negabinary addition.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.1 cracked.guide::kind::exercise
TAOCP §4.1, exercise 13 (rated M21, recommended): what is it asking?	Whether expansions in base -10 can be ambiguous, like 0.999... in decimal.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.1 cracked.guide::kind::exercise
TAOCP §4.1, exercise 19 (rated 23, recommended): what is it asking?	Which digit sets let every integer be written in a given base.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.1 cracked.guide::kind::exercise
TAOCP §4.1, exercise 34 (rated 22, recommended): what is it asking?	Write an integer with digits -1, 0, 1 using the fewest nonzero digits. Used in fast exponentiation and hardware multipliers.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.1 cracked.guide::kind::exercise
TAOCP §4.1, exercise 31 (rated M35, recommended): what is it asking?	2-adic numbers as infinite two's complement. The stretch.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.1 cracked.guide::kind::exercise
TAOCP §4.1: how many exercises, and how are they rated?	34 exercises, rated 00 to M40.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.1 cracked.guide::kind::exercises
TAOCP §4.1: what should you be comfortable with first?	<ul><li>1.2.4 Integer Functions</li></ul>	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.1 cracked.guide::kind::prereqs
TAOCP §4.1: how should you work through it?	Convert a few numbers to base -2 and balanced ternary by hand. Write a function that converts to any mixed radix.	cracked.guide cracked.guide::phase::taocp-2 cracked.guide::section::4.1 cracked.guide::kind::approach
