Lectures‎ > ‎


Welcome - Today's Topics


Computer Architecture and the Hardware/Software Interface

Software Stack
Hardware Stack
Draw Picture
Our focus: C Programming, Assembly Programming, Machine Code, Digital Design, Processor Design, Cache Memory Design


TAs: Rohith Madhavan and Casey Haber
Your name, year, and which OS and editor you use.
Practice names

Quick C Code Decoding

Work in groups of 5 to figure out what the following C code outputs. Do not compile/run to figure out.
You can ask yes/no questions of me and the TAs

Program 1:


int main(int argc, char **argv)
    unsigned char a;
    a = 0;
    printf("a = %d\n", (int) a);
    a = a - 1;
    printf("a = %d\n", (int) a);

    return 0;

Program 2:

struct foo {
    int a;
    int b;
    char c;
    char d;
    char e;

int main(int argc, char **argv)
    struct foo myfoo;
    int *p;
    int x;
    char *c;
    myfoo.a = 1;
    myfoo.b = 2;
    myfoo.c = '1';
    myfoo.d = '2';
    myfoo.e = '\0';
    p = &myfoo.a;
    p = p + 1;
    x = *p;
    printf("x = %d\n", x);
    p = p + 1;
    c = (char *) p;
    printf("c = %s\n", c);
    return 0;


Structure of class
Due dates

Canvas, GitHub, and Piazza

Canvas for grades and quizzes only
Github for projects and homework
Piazza for class communication

Required Materials

Book: Digital Design and Computer Architecture: ARM Edition
  Kindle, Paperback, Bookstore
Hardware: Raspberry Pi 2 or 3 + Accessories


Raspberry Pi 3

This is an ARM-based (ARMv8/ARMv7) computer with GPU, USB, Ethernet, Audio, GPIO and more.
ARM processors are used in almost all mobile devices (iPhone, iPad, Android), there is a rumor that Apple is working on a ARM based laptop/desktop computer.
Everyone must purchase their own Raspberry Pi 3 model B

At a minimum you need
    A Raspberry Pi 3 B Single Board Computer
    USB TTL cable
    A USB power cable with a switch
    An 8GB (or higher) micro sd cards (get high speed)
    A case (highly recommended)    
    Optional: USB ethernet adapter plus ethernet cable