COMPSCI 105 Lecture Notes - Lecture 1: Significant Figures, Foil Method, Scientific Notation

44 views3 pages

Document Summary

Byte: packet of 8 bits (french word is octet ) 1 bit gives 2^1 = 2 patterns: 0 or 1. 2 bits gives 2^2 = 4 patterns: 00, 01, 10, 11. 3 bits gives 2^3 = 8 patterns: 000, 001, 010, 011, 100, 101, 110, 111. Each new bit doubles the number of patterns, therefore n bits gives 2^n distinct patterns. Can encode any integer between 0 and 255. Pick storage size of n bits (8, 16, 32, 64, etc. ) Smallest value is all zeroes (decimal value 0) Half of 2^n = 2^n/2 = 2^(n - 1) Signed range is therefore -2^(n - 1) + 2^(n - 1) - 1. Minimum: -2^(8 - 1) = -2^7 = -128. Maximum: +2^(8 - 1) = +2^7 - 1 = 128-1 = 127. For n bits, divide into two n/2 bit sections: Numbers are easy to deal with as long as neither section exceeds the n/2 bits of its integer.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents