Digital information 1: Bits and Bytes and Binary numbers
What's in a byte?
-A byte represents different types of information depending on the context. It might represent a number, a letter, or a program instruction. It might even represent part of an audio recording or a pixel in an image.
bit
-Computers store information using bits -bit is short for "binary digit" -stores either the value 0 or 1 -the smallest piece of information in a computer, a single value storing either 0 or 1.
Physical storage
-Computers typically store bits using electromechanical transistors which can map electrical signals to either an on or off state.
Sequences of bits
-Computers use multiple bits to represent data that is more complex than a simple on/off value. -can represent many things: a number, a character, a pixel. -the same sequence can represent different types of data in different contexts.
From bits to bytes
-Conversion between bits and bytes is a simple calculation: divide by 8 to convert from bits to bytes or multiply by 8 to convert from bytes to bits
What fits in a bit (binary digit)?
-Either character used in the binary number system, so a 0 or a 1. -A single bit can only represent two different values, represents any two-valued state.
Patterns in binary numbers with odd numbers
-The last bit is always the ones' place, and if a number is odd, it must have a 1 in that ones' place
Why bytes? What is so special about 8 bits that it deserves its own name?
-a byte is how much a computer likes to "bite" at once. -The byte is also the smallest addressable unit of memory in most modern computers. A computer with byte-addressable memory can not store an individual piece of data that is smaller than a byte.
Binary numbers system
-works the same way as decimal. The only difference is that instead of multiplying the digit by a power of 10, we multiply it by a power of 2.
highest number that can be represented by n bits
2^n - 1
Byte
a unit of digital information that consists of 8 of those bits
