fix(CS-3843): only show nonzero powers of 2 for HW3

This commit is contained in:
Price Hiller 2024-09-24 23:45:10 -05:00
parent 6c291be12f
commit 789c3fd1fa
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB

View File

@ -59,15 +59,15 @@
/* -------------- */
[0xA], [1010], [$2^3 + 2^1 = 10$], [$-2^3 + 2^1 = -6$],
hlinex(start: 0),
[0x1], [0001], [$0 ⋅ 2^3 + 0 ⋅ 2^2 + 0 ⋅ 2^1 + 1 ⋅ 2^0 = 1$], [$-0 ⋅2^3 + 0 ⋅ 2^2 + 0 ⋅2^1 + 1 ⋅2^0 = 1$],
[0x1], [0001], [$2^0 = 1$], [$2^0 = 1$],
hlinex(start: 0),
[0xB], [1011], [$1 ⋅ 2^3 + 0 ⋅ 2^2 + 1 ⋅ 2^1 + 1 ⋅ 2^0 = 11$], [$-1 ⋅ 2^3 + 0 ⋅ 2^2 + 1 ⋅ 2^1 + 1 ⋅ 2^0 = -5$],
[0xB], [1011], [$2^3 + 2^1 + 2^0 = 11$], [$2^3 + 2^1 + 2^0 = -5$],
hlinex(start: 0),
[0x2], [0010], [$0 ⋅ 2^3 + 1 ⋅ 2^2 + 0 ⋅ 2^1 + 0 ⋅ 2^0 = 2$], [$-0 ⋅ 2^3 + 1 ⋅ 2^2 + 0 ⋅ 2^1 + 0 ⋅ 2^0 = 2$],
[0x2], [0010], [$2^2 = 2$], [$2^2 = 2$],
hlinex(start: 0),
[0x7], [0111], [$0 ⋅ 2^3 + 1 ⋅ 2^2 + 1 ⋅ 2^1 + 1 ⋅ 2^0 = 7$], [$-0 ⋅ 2^3 + 1 ⋅ 2^2 + 1 ⋅ 2^1 + 1 ⋅ 2^0 = 7$],
[0x7], [0111], [$2^2 + 2^1 + 2^0 = 7$], [$2^2 + 2^1 + 2^0 = 7$],
hlinex(start: 0),
[0xC], [1100], [$1 ⋅ 2^3 + 1 ⋅ 2^2 + 0 ⋅ 2^1 + 0 ⋅ 2^0 = 12$], [$-1 ⋅ 2^3 + 1 ⋅ 2^2 + 0 ⋅ 2^1 + 0 ⋅ 2^0 = -4$],
[0xC], [1100], [$2^3 + 2^2 = 12$], [$-2^3 + 2^2 = -4$],
)]
#v(1em)