diff --git a/content/notes/cosc-204.md b/content/notes/cosc-204.md index 4575eee7b..badfcded0 100644 --- a/content/notes/cosc-204.md +++ b/content/notes/cosc-204.md @@ -17,8 +17,8 @@ By completion of this paper students are expected to: ## Hardware - Understand how programs are executed on computer hardware +- [memory](notes/memory.md) -- [01-bits-and-bytes](notes/01-bits-and-bytes.md) ## Assembly - Demonstrate an ability to read and write assembly language programs @@ -36,6 +36,7 @@ By completion of this paper students are expected to: - Be aware of the importance of efficient use of resources from computational, economic, and environmental viewpoints # Lectures +- [01-bits-and-bytes](notes/01-bits-and-bytes.md) # Archive diff --git a/content/notes/digital-data.md b/content/notes/digital-data.md new file mode 100644 index 000000000..d9656963e --- /dev/null +++ b/content/notes/digital-data.md @@ -0,0 +1,41 @@ +--- +title: "digital-data" +aliases: +tags: +- cosc204 +--- + +# What is data +- A fact — a piece of information + - corresponds to discreete facts about phenomena from which we gain information abou the world +- The concept of a *value* is fundamental to data + - e.g., 25, $356.00, April, "this is a sentence", colours etc +- Vaues are abstract, they are interpretations of data + - There are many way of storing the same data + - e.g., 12, twelve, XII, 1100, · ··, ·----··--- + +# How computers represent data +- 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 + +# 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 nibbles or bits. (they are too small to work with most of the time) + +# Memory +Data is stored in [memory](notes/memory.md) + +# 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 +- [amount of bits for different devices](https://i.imgur.com/nHrz1zX.png) + +# Characters diff --git a/content/notes/memory.md b/content/notes/memory.md new file mode 100644 index 000000000..d397e74a7 --- /dev/null +++ b/content/notes/memory.md @@ -0,0 +1,12 @@ +--- +title: "memory" +aliases: +tags: +- cosc204 +--- + +Computer memory is a series of switches (similar to the switchboard in a house). Each switch is identified by a number and is either on or off. + +(High level) Programming languages allow us to name some of the locations using variables. this is easier than remembering the number of each "switch" + +These switches are mostly located in RAM.