#separator:tab
#html:true
#notetype:Basic
#tags column:3
#deck:cracked.guide::TAOCP Vol 4A::7.1.2 Boolean Evaluation
#columns:Front	Back	Tags
TAOCP §7.1.2 Boolean Evaluation: what does it cover?	Computing Boolean functions with few operations. Knuth defines Boolean chains and their cost, length and depth, finds optimum chains for every function of four variables (Algorithm L and the footprint method), looks at evaluation with minimum memory, multiple outputs such as adders and the seven-segment display, asymptotic counts, functions with don't-cares, a tic-tac-toe player built from gates, and functional decomposition.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.2 cracked.guide::kind::about
TAOCP §7.1.2: why does it matter?	This is how hardware designers think, and it is the same skill as writing branch-free code. The game Shenzhen I/O touches the same instincts.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.2 cracked.guide::kind::why
TAOCP §7.1.2, exercise 1 (rated 24): what is it asking?	Rewrite a cost-4 chain as a depth-3 formula of the same cost. Gets you comfortable with the cost versus depth trade-off.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.2 cracked.guide::kind::exercise
TAOCP §7.1.2, exercise 8 (rated 20, recommended): what is it asking?	Explain why a particular bit pattern is the truth table of a variable. You will use these masks constantly in 7.1.3 and 7.1.4.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.2 cracked.guide::kind::exercise
TAOCP §7.1.2, exercise 10 (rated 20, recommended): what is it asking?	Change Algorithm L to compute minimum depth instead of formula length. A small edit that shows you understand the dynamic program.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.2 cracked.guide::kind::exercise
TAOCP §7.1.2, exercise 27 (rated 23, recommended): what is it asking?	Decide whether a full adder fits in five steps using only three one-bit registers.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.2 cracked.guide::kind::exercise
TAOCP §7.1.2, exercise 34 (rated 22, recommended): what is it asking?	Design a priority encoder with linear cost and logarithmic depth. A real hardware building block.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.2 cracked.guide::kind::exercise
TAOCP §7.1.2, exercise 44 (rated 26, recommended): what is it asking?	View binary addition as a finite-state transduction and derive a fast parallel adder from it. Carry lookahead from first principles.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.2 cracked.guide::kind::exercise
TAOCP §7.1.2, exercise 56 (rated 16, recommended): what is it asking?	Explain why functions with many don't-cares cost nothing. Quick reading check on partial functions.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.2 cracked.guide::kind::exercise
TAOCP §7.1.2, exercise 36 (rated M28, recommended): what is it asking?	Find chains for all prefix ANDs that have optimum depth and linear cost (Ladner and Fischer). The stretch; this is the parallel prefix idea behind fast adders and GPU scans.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.2 cracked.guide::kind::exercise
TAOCP §7.1.2: how many exercises, and how are they rated?	88 exercises, rated 15 to 47.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.2 cracked.guide::kind::exercises
TAOCP §7.1.2: what should you be comfortable with first?	<ul><li>7.1.1 Boolean Basics</li></ul>	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.2 cracked.guide::kind::prereqs
TAOCP §7.1.2: how should you work through it?	Design a full adder with the fewest gates you can, then compare to Knuth. Write a brute-force search for the cheapest chain computing a 3-variable function.	cracked.guide cracked.guide::phase::taocp-4a cracked.guide::section::7.1.2 cracked.guide::kind::approach
