Test  Status  Code Input and Output 

1  Pass 
x = 1;
y=1;
pc=1;
[sum, carry]=bin_sum_carry(pc,x,y)
assert(isequal(sum,1))
assert(isequal(carry,1))
a =
'10'
b =
1
sum =
1
carry =
1
sum =
1
carry =
1

2  Pass 
x = 1;
y=1;
pc=0;
[sum, carry]=bin_sum_carry(pc,x,y)
assert(isequal(sum,0))
assert(isequal(carry,1))
a =
'10'
b =
0
sum =
0
carry =
1
sum =
0
carry =
1

3  Pass 
x = 1;
y=0;
pc=0;
[sum, carry]=bin_sum_carry(pc,x,y)
assert(isequal(sum,1))
assert(isequal(carry,0))
a =
'01'
b =
1
sum =
1
carry =
0
sum =
1
carry =
0

4  Pass 
x = 0;
y=0;
pc=0;
[sum, carry]=bin_sum_carry(pc,x,y)
assert(isequal(sum,0))
assert(isequal(carry,0))
a =
'00'
b =
0
sum =
0
carry =
0
sum =
0
carry =
0

5  Pass 
x = 1;
y=1;
pc=0;
[sum, carry]=bin_sum_carry(pc,x,y)
assert(isequal(sum,0))
assert(isequal(carry,1))
a =
'10'
b =
0
sum =
0
carry =
1
sum =
0
carry =
1

740 Solvers
2341 Solvers
Generate a vector like 1,2,2,3,3,3,4,4,4,4
1709 Solvers
174 Solvers
134 Solvers