cari

Rumah  >  Soal Jawab  >  teks badan

java - RandomAccessFile为什么位移4次就能写入一个Int?

怪我咯怪我咯2803 hari yang lalu833

membalas semua(2)saya akan balas

  • PHP中文网

    PHP中文网2017-04-18 10:41:19

    aaaaaaaabbbbbbbbccccccccdddddddd
    >>>24
    000000000000000000000000aaaaaaaa
    &FF
    000000000000000000000000aaaaaaaa
    aaaaaaaabbbbbbbbccccccccdddddddd
    >>> 16
    0000000000000000aaaaaaaabbbbbbbb
    &FF
    000000000000000000000000bbbbbbbb
    aaaaaaaabbbbbbbbccccccccdddddddd
    >>> 8
    00000000aaaaaaaabbbbbbbbcccccccc
    &FF
    000000000000000000000000cccccccc
    aaaaaaaabbbbbbbbccccccccdddddddd
    >>>0
    aaaaaaaabbbbbbbbccccccccdddddddd
    &FF
    000000000000000000000000dddddddd

    balas
    0
  • 黄舟

    黄舟2017-04-18 10:41:19

    Sama seperti jawapan pertama, bit masking 0xFF menutupi 24 bit atas data, jadi tiada pertindihan

    balas
    0
  • Batalbalas