반응형
rss 아이콘 이미지

Search

'Mobile'에 해당되는 글 1건

  1. 2023.07.17 swift 고급 연산자 (Advanced Operators)

swift 고급 연산자 (Advanced Operators)

카테고리 없음 2023. 7. 17. 17:01 Posted by 법당오빠
반응형
비트 연산자 (Bitwise Operators)
Swift에서도 여러 비트 연산자를 지원합니다.
비트 연산자 NOT (Bitwise NOT Operator)
비트 연산자 NOT은 비트를 뒤집습니다.

 

let initialBits: UInt8 = 0b00001111
let invertedBits = ~initialBits  // equals 11110000

반응형