From 0317a822d9e6ac81246205174219817c7703bee7 Mon Sep 17 00:00:00 2001 From: Jet Hughes Date: Mon, 11 Jul 2022 10:11:09 +1200 Subject: [PATCH] vault backup: 2022-07-11 10:11:09 --- content/notes/01-bits-and-bytes.md | 32 +++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/content/notes/01-bits-and-bytes.md b/content/notes/01-bits-and-bytes.md index 37444c840..0f126eed2 100644 --- a/content/notes/01-bits-and-bytes.md +++ b/content/notes/01-bits-and-bytes.md @@ -16,5 +16,35 @@ tags: - e.g., 12, twelve, XII, 1100, · ··, ·----··--- # How computers represent data -- In Binary +- In *Binary* - Stored in one of two states, true/false, 1/0, on/off, voltage/no voltage +- Each instance of a state is called a *bit*. (binary digit) +- *Values* are represented as a sequence of bits. + - e.g., 1000001 + - The computer doesn't "know" what any given sequence means, **you** know. + - could be 65, A, or anything **You** want it to mean + +# Computer memory +- SImilar to the switch board in your home +- Each switch has a number +- they are all always there +- you can switch the state by flipping the switch + + - Each switch has: + - A address/location (swtich number) + - A value (on/off) + +- computer languages allow us to name some of the locations, its easuer than remembering its number (variable) + + +# Bits, Nibbles, Bytes +- The smallest unit of storage is a buit (0 or 1) +- (for convenience) bit are grouped into larger units. + - a nibble is 4 bits + - a byte is 8 bits +- For convenience bytes are given addresses, not nibble or bits. (they are too small to work with most of the time) + +# A Word of memory +- The word is the number of bits the cpu uses internally, varies between manufacturers and CPUs. +- Now its usually 64 bits +- \ No newline at end of file