Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Math CPS120: Binary Representations. Binary computers have storage units called binary digits or bits: Low Voltage = 0 High Voltage = 1 all bits.

Similar presentations


Presentation on theme: "Computer Math CPS120: Binary Representations. Binary computers have storage units called binary digits or bits: Low Voltage = 0 High Voltage = 1 all bits."— Presentation transcript:

1 Computer Math CPS120: Binary Representations

2 Binary computers have storage units called binary digits or bits: Low Voltage = 0 High Voltage = 1 all bits have 0 or 1 22 Binary and Computers

3 8 bits = 1 byte The number of bytes in a word determines the word length of the computer: 32-bit machines 64-bit machines etc. 23 Binary and Computers

4 Binary Representations One bit can be either 0 or 1. Therefore, one bit can represent only two things. To represent more than two things, we need multiple bits. Two bits can represent four things because there are four combinations of 0 and 1 that can be made from two bits: 00, 01, 10,11.

5 Binary Representations (Cont’d) If we want to represent more than four things, we need more than two bits. Three bits can represent eight things because there are eight combinations of 0 and 1 that can be made from three bits.

6 Binary & Alphanumeric Codes A binary code is a group of n bits that assume up to 2 n distinct combinations of 1’s and 0’s with each combination representing one element of the set that is being coded- i.e. permutations With two bits we can form a set of four elements With three bits we can represent 8 elements With four bits we can represent 16 elements

7 Binary Representations (Cont’d) Figure 3.4 Bit combinations

8 Binary Representations (Cont’d) In general,  bits can represent 2  things because there are 2  combinations of 0 and 1 that can be made from n bits. Note that every time we increase the number of bits by 1, we double the number of things we can represent.

9 Memory Units 1 nibble 1 byte 1 word 1 long word 1 quad word 1 octa-word 4 consecutive bits 8 consecutive bits 2 consecutive bytes 4 consecutive bytes 8 consecutive bytes 16 consecutive bytes

10 Larger Units of Memory 1 Kilobyte 1 Megabyte 1 Gigabyte 1 Terabyte 1 Petabyte 1 Exabyte 1024 bytes ~10 6 bytes ~10 9 bytes ~10 12 bytes ~10 15 bytes ~10 18 bytes 32 Mb = 32*10 3 Kb = 32 * 10 3 *1024 bytes = 32,768,000 bytes


Download ppt "Computer Math CPS120: Binary Representations. Binary computers have storage units called binary digits or bits: Low Voltage = 0 High Voltage = 1 all bits."

Similar presentations


Ads by Google