At the smallest range in the computer, details is stored together bits and also bytes. In this section, we"ll learn exactly how bits and bytes encode information.
a "bit" is atomic: the smallest unit that storageA little bit stores simply a 0 or 1"In the computer it"s every 0"s and 1"s" ... BitsAnything v two different states can store 1 bitIn a chip: electrical charge = 0/1In a hard drive: clues of North/South magnetism = 0/1A bit is too small to be lot useGroup 8 bits together to do 1 byteEverything in a computer system is 0"s and also 1"s. The bit stores just a 0 or 1: it"s the smallest structure block the storage.
Byte
One byte = arsenal of 8 bitse.g. 0 1 0 1 1 0 1 0One byte have the right to store one character, e.g. "A" or "x" or "$"
How plenty of Patterns v N Bits? (demo)
How numerous different patterns can be made with 1, 2, or 3 bits?
Number the bits different Patterns
1
0 1
2
00 01 10 11
3
000 001 010 011 100 101 110 111
3 bits vs. 2 bitsConsider simply the outward bitIt have the right to only be 0 or 1Leftmost bit is 0, climate append 2-bit patternsLeftmost bit is 1, climate append 2-bit patterns again3-bits has twice as countless patterns as 2-bits
Number of bits different Patterns
1
0 1
2
00 01 10 11
3
000 001 010 011 100 101 110 111
In general: add 1 bit, dual the number of patterns1 little - 2 patterns2 bits - 4 3 bits - 84 bits - 165 bits - 326 bits - 647 bits - 1288 bits - 256 - one byteMathematically: n bits returns 2n trends (2 to the nth power)
One Byte - 256 patterns (demo)
1 byte is team of 8 bits8 bits can make 256 different patternsHow to use the 256 patterns?How to store a number in a byte?Start v 0, go up, one pattern every number, till run the end of patterns0, 1, 2, 3, 4, 5, ... 254, 255One byte can hold a number between 0 and also 255i.e. Through 256 different patterns, we have the right to store a number in the selection 0..255 Really an excellent for save on computer characters/letters.
"Byte" - unit of information storageA document, an image, a movie .. How many bytes?1 byte is sufficient to hold about 1 typed character, e.g. "b" or "X" or "$"All warehouse is measure in bytes, regardless of being an extremely different hardwareKilobyte, KB, around 1 thousands bytesMegabyte, MB, around 1 million bytesGigabyte, GB, about 1 billion bytesTerabyte, TB, about 1 trillion bytes (rare)
Bytes and Characters - ASCII Code
ASCII is an encoding representing each typed personality by a numberEach number is save on computer in one byte (so the number is in 0..255)A is 65B is 66a is 96space is 32"Unicode" is one encoding because that mandarin, greek, arabic, etc. Languages, commonly 2-bytes every "character"
Each letter is stored in a byte, as below100 typed letters takes increase 100 bytesWhen you send, say, a message message, the numbers space sentText is quite compact, using few bytes, compared to photos etc.