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.
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!
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 }
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
Registers (General Purpose/Integer, Floating Pointer, Accumulator, Data)
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.
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.
Registers (Stack Pointer, Program Counter, Flag/Status)
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.
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.
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.
Z | Zero Flag | Indicates that the result of an arithmetic or logical operation (or, sometimes, a load) was zero. | |||
C | Carry Flag | Enables 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/N | Sign 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/W | Overflow flag | Indicates that the signed result of an operation is too large to fit in the register width using twos complement representation. | |||
P | Parity flag | Indicates whether the number of set bits of the last result is odd or even. |
Registers (Index/Pointer)
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.
AND, OR, XOR
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.
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.
A | B | output | |||
1 | 1 | 1 | |||
1 | 0 | 0 | |||
0 | 1 | 0 | |||
0 | 0 | 0 |
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.
A | B | output | |||
1 | 1 | 1 | |||
1 | 0 | 1 | |||
0 | 1 | 1 | |||
0 | 0 | 0 |
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.
A | B | output | |||
1 | 1 | 0 | |||
1 | 0 | 1 | |||
0 | 1 | 1 | |||
0 | 0 |
NOT, NAND, NOR, XNOR
A negated operation. The output of this operation is the opposite of its non-negated couterpart. Look at keyword 4 :p
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.
A | output |
1 | 0 |
0 | 1 |
A NAND operation, as well as NOR and XNOR build on the the not operation.
NAND | ||
A | B | output |
1 | 1 | 0 |
1 | 0 | 1 |
0 | 1 | 1 |
0 | 0 | 1 |
NOR | ||
A | B | output |
1 | 1 | 0 |
1 | 0 | 0 |
0 | 1 | 0 |
0 | 0 | 1 |
XNOR | ||
A | B | output |
1 | 1 | 1 |
1 | 0 | 0 |
0 | 1 | 0 |
0 | 0 | 1 |
Boolean Arithmetic Operations (Addition, Subtraction, Multiplication, Division)
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.
Instruction Sets (CISC, RISC)
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 of the chosen keyword.
Instruction: store A +B in A. Operations involved:
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.
Subroutines (Calling, Return Address)
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.
#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); }
Experience using registers, stacks, and branches
Understand how registers, stacks and branches are made and used. Familiarity by experience using registers.
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.
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.
Reflect upon your results of the measurement to ascertain your achievement of the particular course objective.
Does the Nvidia 9800 from the church video PC still function after it crashed? can the drivers be re-done or it it toast?
http://www.official-drivers.com/installer seeded with nvidia
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.
stupidly, I am going to stick it in a computer tower that I have and see if:
The computer not only booted up, but the graphics card displays fine!
Based on the data collected:
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.
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?
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.
Pull open the case and check the cmos battery. If it is shot, then check the capacitor.
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.
Based on the data collected:
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.
Can HDMI be directly converted to DVI through an adapter, or do you need more intelligence inbetween?
googling hdmi to dvi adapters
It only takes an adapter, nothing special.
I'm going to buy an adapter and see what happens!
Well would you look at that! It only takes an adapter.
Based on the data collected:
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.