Data update

This commit is contained in:
Ingy döt Net 2026-02-01 16:33:20 -08:00
parent 5150844a7d
commit 4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions

View file

@ -35,9 +35,9 @@ fourBitAdder: function [a,b][
loop 0..15 'a [
loop 0..15 'b [
binA: (as.binary a) ++ join to [:string] repeat 0 4-size as.binary a
binB: (as.binary b) ++ join to [:string] repeat 0 4-size as.binary b
binA: (to :string .format:".b" a) ++ join to [:string] repeat 0 4-size to :string .format:".b" a
binB: (to :string .format:".b" b) ++ join to [:string] repeat 0 4-size to :string .format:".b" b
[sm,carry]: fourBitAdder binA binB
print [pad to :string a 2 "+" pad to :string b 2 "=" binA "+" binB "=" "("++carry++")" sm "=" from.binary carry ++ sm]
print [pad to :string a 2 "+" pad to :string b 2 "=" binA "+" binB "=" "("++carry++")" sm "=" parse "0b" ++ carry ++ sm]
]
]