Table of Contents

Part 1

Entries

Entry 1: January 26th, 2012. 11:10 PM EST

I am pretty sure that this is going to be the ONLY class I enjoy this semester. Physics is so nit-picky it is driving me crazy and the first week isn't even over! Then there is biology… If you put my first weeks bio notes in a book it would be the size of the websters exhaustive concordance.

Let's just get this project moving, I can't wait to learn the very basics, the fundamental parts of the foundation if you will.

Entry 2: February 8th, 2012 EST

Today was an epic day to say the least. Today we ventured into the crazy land of flipflops which pretty much flipfloped my mind. Since I was the one to bring up starting flipflops I got to code the first flip flop and I tell you what, it was insane! Not that the code was anything durastic. It wasn't 500 lines long, and it didn't use a bunch of strange libraries that noone had ever heard of before, it was that the logic didn't make sence. Beow is an example of a NAND flipflop:

include "nandff.h"
 
NANDFF::NANDFF() //NANDFF constructor
{
        mynandgate = new NAND();  //instantiation of a NAND gate
        mynandgate2 = new NAND(); //second NAND gate
        mynotgate = new NOT();    //Not gate
}
 
 
bool NANDFF::Q() //here is where the magic begins!
{
mynandgate -> setA(A);
mynandgate -> setB(mynandgate2 -> getX());
mynandgate2 -> setA(mynandgate -> getX());
mynandgate2 -> setB(B);
 
return(mynandgate -> getX());
} //bool Q is the output of the NANDFF that is not negated.
 
bool NANDFF::NQ()
{
mynandgate -> setA(A);
mynandgate -> setB(mynandgate2 -> getX());
mynandgate2 -> setA(mynandgate -> getX());
mynandgate2 -> setB(B);
 
mynotgate -> setA(mynandgate -> getX());
 
return(mynotgate -> getX());
} //likewise NQ is the negated output of NANDFF.

Does this make any sence to you? It makes sence to me, I just don't totally get it!

Entry 3: February 24th, 2012 11:39 EST.

It is amazing how an internet meem can help you understand a computer science topic. We used long cat(turned into long worm) to describe the concept of an infinite tape. And when you understand the joke about long cat being reeeeeally long, or pretty much infinate in our understanding, it make so much sence! Anyways, we have been working from the top down lately trying to make sence of the menu that will be displayed. This is really helpful because we start to realize what functions we need and at what level they need to be developed, so we can develop our base logic into the bigger parts. An example of this is finding out what type of registers we will need, and how many, and then using our base logic to build those types of registers. our menu looks like this:

while ((input != 8)&&(snap != 'y'))
        {
                printf("Computer Simulator Menu, yo\n\n");
                printf("1) Enter Program\n");
                printf("2) Run Program\n");
                printf("3) Single Step Program\n");
                printf("4) Load from File\n");
                printf("5) Save to File\n");
                printf("6) Memory Dump\n");
                printf("7) Register Display\n");
                printf("8) Exit\n");
                printf("Please enter your choice: ");
                cin << input:
                switch (input)
                {
                        case 1:
                                printf("Enter memory address to start at: ");
                                cin << hexnum;
                                //
                                break;
                        case 2:
                                printf("Enter hex address to run at: ");
                                cin << hexnum;
                                //
                                break;
                        case 3:
                                printf("Enter hex address to run at: ");
                                cin << hexnum;
                                //
                                break;
                        case 4:
                                printf("Enter file name to load program from: ");
                                cin << filename;
                                //
                                break;
                        case 5:
                                printf("Enter file name to save to: ");
                                cin << filename;
                                printf("Enter program starting address to save to file '%s'", &filename);
                                cin << hexnum;
                                //
                                break;
                        case 6:
                                //print out a listing of hex addresses used in current programs
                                //dump all da crap
                                break;
                        case 7:
                                //print out the contents of all the registers and the hex address  for the cpu
                                break;
                        case 8:
                                break;
                        default:
                                printf("Invalid option");
                                //reprint menu
                }

Entry 4: February 28th, 2012 at 12:00 PM EST

Over the last week we have been covering our menu, a bit on registers, and the turing machine. First off is our menu, which i posted a copy of in my last entry. It hasen't developed very much, but i plan top develop it more tomorrow(wednesday), so that we can create logic to print out register addresses and contents, dump memory and exit out of the menu loop when 8 is pressed. Maybe even develop the inner menues of each case a little bit more. Now on to turing, the unstable autistic! Genious or madman? or both? Turings special case of autism led him into a whole new world of intelligence. He could imagine and remember whole elements of a “computer system” in his head. He created to touring machine out of pure imagination fabrication, meaning it was all in his head. This touring machine ran by a not so complex, but exhaustive set of symbols that I still don't really understand. The logic is a bit beyond my comprehension without writing it down, I can't do it all in my head :p

Keywords

asm Keywords

asm Keyword 1: Rgisters Part One

Registers (General Purpose/Integer, Floating Pointer, Accumulator, Data)

Definition

Registers are a small amount of storage used by a processor. They are like a series of data boxes that can be used to store data for use for arithmetic, manipulation, or testings by some machine instruction. They allow processors quick-access of pieces of memory they may use frequently, allowing for quick access because the processor doesn't have to continually fetch that data from the hard-disk or RAM.

Accumulator

An accumulator is a type of register that allows for quick storage and access of data that was used for arithmetic, or is created as result of arithmetic. Without accumulators the CPU would have to write each arithmetic action to the main memory storage, only to sometimes be immedietely re-used for something else, causing the processor to access the main memory more than needed.

asm Keyword 2: Registers Part Two

Registers (Stack Pointer, Program Counter, Flag/Status)

Definition
Stack Pointer

A stack pointer is a special type of register that points to the top of the stack. This thpe of register is usually called a Frame Pointer and is set up to point to a fixed location in the frame structure.

Program Counter

A program counter is a processor register that tells the computer where it is in it's instruction sequence. This type of register can hold either the memory address or the current instruction to be executed, or the next instruction to be executed. This register is usually incremented automatically after a program instruction is grabbed, this makes the cpu retrieve instructions sequentially from memory.

These memory addresses can contain jump instructions and returns which allow the set sequence to be interupted by telling the cpu to look at a new memory location for it's next access point.

flag/status

This type of register is a collection of flag bits for a processor. It contains information about the process state. Individual bits are read and/or written by the instruction execution on the processor. A status register can have many fields, but the classic design includes at least these three: Zero, Carry, and Overflow.

The most common flags
ZZero FlagIndicates that the result of an arithmetic or logical operation (or, sometimes, a load) was zero.
CCarry FlagEnables numbers larger than a single word to be added/subtracted by carrying a binary digit from a less significant word to the least significant bit of a more significant word as needed. It is also used to extend bit shifts and rotates in a similar manner on many processors (sometimes done via a dedicated X flag).
S/NSign flag / Negative flag Indicates that the result of a mathematical operation is negative. In some processors,[1] the N and S flags are distinct with different meanings and usage: One indicates whether the last result was negative whereas the other indicates whether a subtraction or addition has taken place.
V/O/WOverflow flagIndicates that the signed result of an operation is too large to fit in the register width using twos complement representation.
PParity flagIndicates whether the number of set bits of the last result is odd or even.

asm Keyword 3: Register Part Three

Registers (Index/Pointer)

Definition

An index register is found in the CPU and is used for modifying operand addresses during a program, usually for vector or array operations. This process register is used for indirect addressing where an immediate constand is forced into the contents of a register to form the address to the actual operand or data.

This type of register was implemented around 1955-1964.

asm Keyword 4: Logic Operations

AND, OR, XOR

Definition

Logical operations are called boolean logic, a logic of truth values. The boolean algebra laws can be defined axiomatically because axioms, along with there theorems provide for every possible assignment of 0 or 1 to their given variables.

This is because boolean algebra is based around the thought of two variables. usually taken to be T & F or 0 & 1. To understand this boolean logic, it really doesnt matter if you use T&F, 1&0, or Sneeches w/ stars and Sneeches w/o stars, as long as you have 2 independant variables.

AND

The AND operation can be thought of as multiplication. when you multiply 0 by 0, what do you get? 0. when you multiply 1 by 0, what do you get? 0. 1 by 1? 1. That is the basis behind an AND gate, and this logic develops a truth table like so.

ABoutput
111
100
010
000
OR

The OR operation can be though of as addition, sorta ;). When you add 0 to 0 you get 0, 1 to 1 you get 1, 0 to 1 you get 1. In any case this means that if A, B or AB is 1, you get a one.

ABoutput
111
101
011
000
XOR

Not sure how to explain this one mathmatically, but it works like this. If A or B is 1 but not both, then the output is one. Else the output is 0.

ABoutput
110
101
011
00

asm Keyword 5: Logical Operations cont.

NOT, NAND, NOR, XNOR

Definition

A negated operation. The output of this operation is the opposite of its non-negated couterpart. Look at keyword 4 :p

NOT

A NOT operation is the basis behind a negated operation. This basically means that if the input was one thing, it comes out the other. If you put in a 1, you get a 0. Put in a 0, get a one.

Aoutput
10
01

A NAND operation, as well as NOR and XNOR build on the the not operation.

NAND
ABoutput
110
101
011
001
NOR
ABoutput
110
100
010
001
XNOR
ABoutput
111
100
010
001

asm Keyword 6: Boolean Arithmetic

Boolean Arithmetic Operations (Addition, Subtraction, Multiplication, Division)

Definition

Boolean algebra is a type of arithmetic based off from two variables. The operations to be discussed are addition, subtraction, multiplication and division.

Let's start with subtraction because in boolean algebra, it doesn't exist. The existance of subtraction implies the existance of negative numbers, which are a no no in boolean.

Division, like subtraction, doesn not exist either. The reason for this is because division is really just compunded subtraction, like multiplication is compounded addition.

Addition does exist, it's not like boolean algebra is some messed up alternate reality, it is just a better reality where life is much more simple.

With that beaing said, boolean addition works like so: 0 + 0 = 0 (ok, so far so good) 0 + 1 = 1 (I think i can handle this Pre-k math) 1 + 1 = 1 (Say Whaaaaaaat?) 1 + 1 + 0 + 1 = 1 (someone's been on the bottle)

Because boolean algebra is made up of just 1's and 0's, there is no 2 or 3. Thefore when we add 1 + 1, it can't be zero, so it has to be one by process of elimination.

Multiplication also exists, and makes perfect sence. 0 x 0 = 0 1 x 0 = 0 1 x 1 = 1 Simple as that.

Boolean algebra though does not tend to use 1's and 0's, it uses letters, normally A and B.

asm Keyword 7: instruction sets

Instruction Sets (CISC, RISC)

Definition

Complex instruction set computer or reduced instruction set computer is a type of computer when one instruction can run multiple low-level operations such as arithmetic or memory storage and retrieval.

Demonstration

Demonstration of the chosen keyword.

Instruction: store A +B in A. Operations involved:

  1. retrieve A
  2. retrieve B
  3. add A + B
  4. store answer in A

And even so many other sub-operations are going on inside of operations like add A+B because register called accumulators are involved in storing A and B and their result as things are manipulated.

asm Keyword 8: Subroutines

Subroutines (Calling, Return Address)

Definition

A subroutine is a snippet of code within a larger program that executes one specific task that is entirely dependant of the remaining code. Subroutines are also called subprograms and as you can imagine, it is because they act as programs inside of a program. These subprograms are usually programmed so that they can be easily called multiple times within a program without re-writing the code over and over.

An example of a subroutine is a method that computes a logorithm or a matrix determinate. The method can accept 0 or more inputs and return 0 or 1 things.

These subroutines are often grouped into structures called libraries so that a large grouping of them can be easily accessed.

Demonstration
#include <stdio.h>
#include "library of subroutines"
int main()
{
    print "please enter a logarithm base"
    save input1
    print "please enter a second number for the logarithm"
    save input2
    answer = logarithmsubroutine(input1, input2)
    print "answer is 'answer'"
    return(0);
}

asm Objective

asm Objective

Experience using registers, stacks, and branches

Definition

Understand how registers, stacks and branches are made and used. Familiarity by experience using registers.

Method

So far we have been understanding them by reading up about them, asking questions, actually getting into building registers from flipflop. I believe the best way to understand all of these topics is to actually build them and understand their functionality.

Measurement

So far so good, we have started to build flipflop so that we can build registers. This has already helped me to start to grasp what a register really is and how one works. I have done a lot of reading on registers for opus keywords and will be asking a lot of questions in class tomorrow.

Analysis

Reflect upon your results of the measurement to ascertain your achievement of the particular course objective.

  • How did you do? Really good so far, i have learned a lot about flipflops and how they are used to construct register, adders and other things.
  • Is there room for improvement? there is always room for improvement.

Experiments

Experiment 1

Question

Does the Nvidia 9800 from the church video PC still function after it crashed? can the drivers be re-done or it it toast?

Resources

http://www.official-drivers.com/installer seeded with nvidia

Hypothesis

I think that the card will be toast, and that the computer will not boot properly when the card is installed, and that it is beyond help.

There were two video cards running simultaneously in the computer when one of them failed. It took took the operating system with it.

Experiment

stupidly, I am going to stick it in a computer tower that I have and see if:

Data

The computer not only booted up, but the graphics card displays fine!

Analysis

Based on the data collected:

Conclusions

Based on the data collected by this experiment, i can ascertain that the video card is totaly fried, but I still want to try it in another computer, or dual booting to see if the other card will run so i can do diagnostics on the first card.

Experiment 2

Question

What is causing the security camera computer to shut down and restart randomly? what caused the cmos to change by 4 minutes and lose the boot sequence it had?

Resources

http://en.wikipedia.org/wiki/Nonvolatile_BIOS_memory

Hypothesis

Based on my research I believe the the cmos lost the boot sequence because the cmos battery is shot, and there is a cmos capacitor that is malfunctioning.

Experiment

Pull open the case and check the cmos battery. If it is shot, then check the capacitor.

Data

Cmos battery is shot, can't find the capacitor that should be on the board. I'll have to do more extensive research to find out why the computer is shutting down, but i think it is related to the cmos and bios issues.

Analysis

Based on the data collected:

Conclusions

I can conclude that there is most likely a cmos issue because of a dead cmos battery, and that the loss in cmos might have affected the boot sequence to chance, possibly affecting the bios aswell.

Experiment 3

Question

Can HDMI be directly converted to DVI through an adapter, or do you need more intelligence inbetween?

Resources

googling hdmi to dvi adapters

Hypothesis

It only takes an adapter, nothing special.

Experiment

I'm going to buy an adapter and see what happens!

Data

Well would you look at that! It only takes an adapter.

Analysis

Based on the data collected:

Conclusions

I can ascertain that matt haas must have been thinking of something else, and that it only takes an adapter to convert hdmi to dvi.