Computer Math CPS120: Binary Representations. Binary computers have storage units called binary...
-
Upload
naomi-nelson -
Category
Documents
-
view
213 -
download
0
Transcript of Computer Math CPS120: Binary Representations. Binary computers have storage units called binary...
![Page 1: Computer Math CPS120: Binary Representations. Binary computers have storage units called binary digits or bits: Low Voltage = 0 High Voltage = 1 all bits.](https://reader036.fdocuments.in/reader036/viewer/2022082821/5697c0101a28abf838ccb044/html5/thumbnails/1.jpg)
Computer Math
CPS120: Binary Representations
![Page 2: Computer Math CPS120: Binary Representations. Binary computers have storage units called binary digits or bits: Low Voltage = 0 High Voltage = 1 all bits.](https://reader036.fdocuments.in/reader036/viewer/2022082821/5697c0101a28abf838ccb044/html5/thumbnails/2.jpg)
Binary computers have storage units called binary digits or bits:
Low Voltage = 0High Voltage = 1 all bits have 0 or 1
22
Binary and Computers
![Page 3: Computer Math CPS120: Binary Representations. Binary computers have storage units called binary digits or bits: Low Voltage = 0 High Voltage = 1 all bits.](https://reader036.fdocuments.in/reader036/viewer/2022082821/5697c0101a28abf838ccb044/html5/thumbnails/3.jpg)
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
![Page 4: Computer Math CPS120: Binary Representations. Binary computers have storage units called binary digits or bits: Low Voltage = 0 High Voltage = 1 all bits.](https://reader036.fdocuments.in/reader036/viewer/2022082821/5697c0101a28abf838ccb044/html5/thumbnails/4.jpg)
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.
![Page 5: Computer Math CPS120: Binary Representations. Binary computers have storage units called binary digits or bits: Low Voltage = 0 High Voltage = 1 all bits.](https://reader036.fdocuments.in/reader036/viewer/2022082821/5697c0101a28abf838ccb044/html5/thumbnails/5.jpg)
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.
![Page 6: Computer Math CPS120: Binary Representations. Binary computers have storage units called binary digits or bits: Low Voltage = 0 High Voltage = 1 all bits.](https://reader036.fdocuments.in/reader036/viewer/2022082821/5697c0101a28abf838ccb044/html5/thumbnails/6.jpg)
Binary & Alphanumeric Codes A binary code is a group of n bits that
assume up to 2n 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
![Page 7: Computer Math CPS120: Binary Representations. Binary computers have storage units called binary digits or bits: Low Voltage = 0 High Voltage = 1 all bits.](https://reader036.fdocuments.in/reader036/viewer/2022082821/5697c0101a28abf838ccb044/html5/thumbnails/7.jpg)
Binary Representations (Cont’d)
Figure 3.4 Bit combinations
![Page 8: Computer Math CPS120: Binary Representations. Binary computers have storage units called binary digits or bits: Low Voltage = 0 High Voltage = 1 all bits.](https://reader036.fdocuments.in/reader036/viewer/2022082821/5697c0101a28abf838ccb044/html5/thumbnails/8.jpg)
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.
![Page 9: Computer Math CPS120: Binary Representations. Binary computers have storage units called binary digits or bits: Low Voltage = 0 High Voltage = 1 all bits.](https://reader036.fdocuments.in/reader036/viewer/2022082821/5697c0101a28abf838ccb044/html5/thumbnails/9.jpg)
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
![Page 10: Computer Math CPS120: Binary Representations. Binary computers have storage units called binary digits or bits: Low Voltage = 0 High Voltage = 1 all bits.](https://reader036.fdocuments.in/reader036/viewer/2022082821/5697c0101a28abf838ccb044/html5/thumbnails/10.jpg)
Larger Units of Memory 1 Kilobyte 1 Megabyte 1 Gigabyte 1 Terabyte 1 Petabyte 1 Exabyte
1024 bytes ~106 bytes ~109 bytes ~1012 bytes ~1015 bytes ~1018 bytes
32 Mb = 32*103 Kb = 32 * 103 *1024 bytes = 32,768,000 bytes