3 ms·
There was an edge case where when the input was 0x2, it returned 0x1, that was my quick way of handling that.
by FastEatSlow 5y ago
There was an edge case where when the input was 0x2, it returned 0x1, that was my quick way of handling that.
- unnouinceput 5y agoLet's see, step by step, if we put 2 in EAX what happens: Init: EBX = 2; EAX = 2; Loop: EBX = 1;//gets decremented CMP EBX, 1;//it's 1 so we exit Final result is 2. Sounds the edge case is not that of an edge after all