karel icon indicating copy to clipboard operation
karel copied to clipboard

Bug in Task 2.2.1 and 2.2.2

Open MKFeuer opened this issue 2 years ago • 1 comments

Hello i finde some Bug in Task 2.2.1 and 2.2.2

The bug is that in the last column of binary numbers where 256 should be, there is no number if there is a beeper in the column.

I hope you can fix it

MKFeuer avatar Oct 10 '23 12:10 MKFeuer

That is a conscious decision to demonstrate integer overflow:

Karel wants to add 1 to a byte. Karel wants to subtract 1 from a byte.

Bytes only go from 0 to 255. The leftmost beeper is the carry bit.

fredoverflow avatar Oct 14 '23 11:10 fredoverflow