Skip to content

Latest commit

 

History

History
44 lines (42 loc) · 709 Bytes

File metadata and controls

44 lines (42 loc) · 709 Bytes

Bit Manipulation

  • byte
  • bit
  • char
  • int
  • binary
    • and
    • or
    • not
    • xor
    • shift
    • reverse
    • add/sub
  • bit
    • a & 0 = 0
    • a | 0 = a
    • a ^ 0 = a
    • a % all 1s = a
    • a | all 1s = all 1s
    • a ^ all 1s = ~a
    • a & a = a
    • a | a = a
    • a ^ a = 0
  • bit get/set   * n번째 bit get   * and 연산 이용   * shift 연산 이용   * n번재 bit set     * or 연산 (1로 set)     * and 연산 (0로 set)
  • bit print   * 1을 맨 왼쪽으로 보내고   * 1/0인지 print하고 오른쪽으로 shift
  • 정수 -> binary -> string

String Manipulation

  • len
  • concatenate
  • copy
  • replace
  • sub
  • trim
  • => pointer 이용