Apple interview question

2's complement and write test cases