Bits and Bytes with Advanced Operators

Everything you do on computers boils down to bits and bytes, and it’s important to be able to understand things on that level. Even though this seems like an old-school idea, it has many real-world and even future implications. For example, if you want to write code to connect to a Bluetooth low-energy device, such as a heart rate monitor, then you need to look at the Bluetooth specifications for such devices (see https://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.heart_rate_measurement.xml). Notice that in order to be able to get the heart rate out of the data from the Bluetooth device, you need to grab specific bytes and bits. This is a ...

Get Learning Swift™ Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.