A=B
Not enough ratings
Add Two Binary 0
   
Award
Favorite
Favorited
Unfavorite
Tags: level
File Size
Posted
Updated
146.889 KB
4 Apr, 2023 @ 4:47am
28 Dec, 2024 @ 1:01am
4 Change Notes ( view )

Subscribe to download
Add Two Binary 0

Description
Input: Two binary numbers, separated by "+"
Output: Sum of two numbers
Constraint: 1 <= binary number length <= 5
Difference: binary number may starts with 0
I'm not sure the least lines, if you get the answer, please tell me. Current best is by カズエイ.
3 Comments
カズエイ 29 Sep @ 6:47pm 
5 lines (/8 lines)

(once)=||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||0+
1+111111=+1111110
0+111111=1
+11111=
|=(end)+111111
hmm 10 Jul @ 12:43pm 
this is the same as 5-3 but with 0's at the front of the numbers, ignoring constraints
カズエイ 11 Jan @ 3:03am 
8 lines (/0 lines)

1+0+=(end)00++
0+0+0=+0+01
000++=1
100++=00++0
(start)00=0
(start)0+=00000
+=+0+0+
(start)01=1