GithubHelp home page GithubHelp logo

computer-architecture-one's Introduction

Computer Architecture

Welcome to the first class on classical Computer Science! Beginning now, you will be studying the underpinnings of the programming lessons that you have practiced previously.

The first pair of sprints in this coursework are about your computer itself: computer architecture. Generic computers are just a large and careful collection of basic electronics components and wires connecting them. Computer architecture is the specific design of a computer.

Basic Computer Engineering

We can't start our study of computers without a brief discussion of computer engineering. Know what the following words mean:

  • Transistor
  • Logic gate
  • RS Flip Flop

Architecture

Basic Architecture

Computers have grown radically in transistor density and clock speed, but the overall design of your computer has not changed tremendously since the 8086 in 1976 1. Modern computers utilized a fixed component architecture, where separate components can be upgraded, swapped, or redesigned for the next version with minimal impact on other components. It helps to visualize these components on a full size ATX form-factor motherboard:

Image of motherboard An image of an older motherboard - many of the base components are the same, but the front size bus is missing on modern motherboards because it is now inside of the CPU.

LGA-1151 socket The pins on the bottom of the CPU that connect it with the rest of the system components: clock controls, buses, serial interfaces, interrupts, power

i7 CPU on motherboard

Kaby Lake Quad Core

Quad core manual diagram

Amazing explanation of Kaby Lake CPU architecture

Elements of the CPU

CPU, Clock(s), Program Counter, Instruction Register, Arithmetic Logic Unit, bus(es), RAM, Registers, Operations

  • CPU - a general purpose hardware component built with custom hardware to: read and write memory, perform arithmetic

  • Clock(s) - Special pieces of electronics hardware that cause a small voltage cycle at an insanely fast speed. Kaby Lake clocks: base, core, ring, IGP, eDRAM, Mem

  • Registers - Small memory locations within the CPU used for retrieving instructions, reading and writing memory, and executing commands.

  • Instruction Register - A special memory register that decodes, pipelines, and executes the current instruction (which was read from the memory pointed to by the program counter). In our small example the instruction register will handle a single instruction, memory address, or data, but in a modern CPU at least 64 bits are available and the instruction can be combined with data like (MUL register1address register2address).

  • Arithmetic Logic Unit - Part of the CPU that handles basic arithmetic and boolean comparisons.

  • Operations - Single numeric values that indicate to the CPU the next step or series of steps.

  • Cache - Memory located inside of the CPU for low latency and high throughput. RAM located outside of CPU fundamentally must be slower, because it is so far away.

  • bus - A set of wires that connects the CPU with other system components such as RAM and peripherals. The CPU has internal buses, and modern systems have different buses for different components: DMA bus, PCI bus,

  • RAM - A grid of bits

Reading:

Bus

RAM

Interrupting the CPU

Polling, Interrupts, and DMA

I/O Bus

APIC

Advanced Programmable Interrupt Controller

Assignment:

Using the ASCII table, a stack, a program counter, and a tiny set of instructions: set, copy, and print, write a program that contains an array of instructions, a "CPU" that reads them starting at index 0, and another array containing the ASCII values, print "Hello world" using node.

#inputfile
00000001 # initialize
00000010 # SET register
00000000 # register #0
00000100 # SAVE next
00001000 # 8
00000010 # SET register
00000001 # register #1
00000100 # SAVE next
00001001 # 9
00000010 # SET register
00000010 # register #3
00000101 # MUL into last
00000000 # register #0
00000001 # register #1
00000010 # SET register
00000010 # register #3
00000101 # PRINT_NUMERIC

Extra credit:

The following command line input:

node microbusarchitecture.js < inputfile

Should produce

Hello World!

Using the above specified architecture. console.log('Hello World!') is not sufficient.

Links

Instruction Register

RAM

PCE Express

computer-architecture-one's People

Contributors

thomcom avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.