Understanding Java bytes

后端 未结 6 893
抹茶落季
抹茶落季 2020-12-31 18:48

So at work yesterday, I had to write an application to count the pages in an AFP file. So I dusted off my MO:DCA spec PDF and found the structured field BPG (Begin Pag

6条回答
  •  鱼传尺愫
    2020-12-31 19:13

    What I want to know is how the bitwise operation works here--more specifically, how I arrive at the binary representation for a negative number.

    The binary representation of a negative number is that of the corresponding positive number bit-flipped with 1 added to it. This representation is called two's complement.

提交回复
热议问题