Challenge: how much range?

On a Mac, a short is a 2-byte integer, and one bit is used to hold the sign (positive or negative). What is the smallest number that a short can store? What is the largest?

An unsigned short only holds non-negative numbers. What is the largest number that an unsigned short can store?

Get Objective-C Programming: The Big Nerd Ranch Guide 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.