cameron marical Posted August 13, 2009 Posted August 13, 2009 So, this is the thread that is the one where I will ask all my questions regarding computers due to the fact that I seem to be taking up too many threads with all my questions. Here is todays question;{oh, there is more to come if no one minds} I was wondering, what is a computer program physically? is it just addresses for specific logic gates? When you type in a computer program, does it just have different logic gates for different commands, {and those logic gates have addresses}, that when typed in has some sort of address assigner that directs those signals to the logic gates wich do what is needed {math, etc...} and displays it on the moniter? Thank you.
bascule Posted August 13, 2009 Posted August 13, 2009 I was wondering, what is a computer program physically? A stored program is physically a bunch of magnetic charges on the platter of your hard drive. is it just addresses for specific logic gates? A running program changes the state of your CPU, which implements the Von Neumann architecture: http://en.wikipedia.org/wiki/Von_Neumann_architecture When you type in a computer program, does it just have different logic gates for different commands The programs you type into a computer are typically in what's called a context free grammar. CPUs can't understand context free grammars directly, so first the program needs to be translated into something the CPU (or another computer program) can understand. In the end, one way or another, your program will generate the appropriate machine language instructions that your computer can understand. that when typed in has some sort of address assigner that directs those signals to the logic gates wich do what is needed {math, etc...} and displays it on the moniter? Yes, more or less. Your CPU walks through the "opcodes", coded instructions that tell it what to do. These opcodes are fed to large structures made out of logic gates. Your CPU has "program counter" which lets it know what opcode it's presently working on. When your computer has finished processing a particular opcode the program counter is incremented and it moves on to the next instruction. There are also "jump" instructions which can change the value of the program counter and move to another instruction some entirely different place in memory. 1
cameron marical Posted August 17, 2009 Author Posted August 17, 2009 OK, another quetion, I was reading about a picture I found and it said that someone constructed a computer out of solely 7400 chips, and a hard drive pretty much {buses too, obviously}. Thats impossible right? what else would you need if it is? merci beaucoup
bascule Posted August 17, 2009 Posted August 17, 2009 There's no reason you can't construct a computer out of 7400 chips, although it probably wouldn't be a very good computer. Many "systems on a chip" and microcontrollers provide an entire self-contained computer on a single chip.
cameron marical Posted August 18, 2009 Author Posted August 18, 2009 I see. I guess my understanding of the 7400 series is mixed up. thanks. I have another. I have come to understand {please tell me if its wrong} that for programming something, you input information into some form of memory, and the information has an address at the beginning of it, so this little reader thing goes through and reads the address and sends information to wherever it is supposed to go {wich is say, right after the address}. Is this similiar to how it works? It seems alot like DNA and the enzyme helicase to me. If it is similiar, then my next question is, how does that specifically work? So stored program computers and logic gates sets are totally different things, but can both do similiar things, and each have their own ups and downs, am I right? for logic gates 'computers' it is more designing than programming right? Bascule, I read up on the von nueman architecture, and I also read up on the turing machine, what do you, since you seem to know a good 2 cents on computers, think is more simple to understand/superior? thanks alot man
cameron marical Posted August 31, 2009 Author Posted August 31, 2009 Alright, another. This is less of a computer question and more of a programming one, but I consider one a branch of the other. I {not for school} want to make a code in python that will display a number that is, say an even number only, or a prime number only. I want it to be displayed near full screen, or as big as possible, but I am not quite sure how to do so. Would I do a loop of some sort? How would a make it full screen? Thank you.
Xittenn Posted September 2, 2009 Posted September 2, 2009 1) Random number generator, multiply by two 2) Store a list of Primes randomize the list 3) two ways both of which will probably require you to bind openGL to do anything remotely interesting: a) Create/Load/Manipulate some font stuff like they do here(there is some resizing stuff in earlier tuts but this is C++) b) Output a font into a text file, convert it to an image file and then stretch it! I'm sure there are easier ways but I can't think of any off of the top of my head and don't really know anything about python.
bascule Posted September 3, 2009 Posted September 3, 2009 I {not for school} want to make a code in python that will display a number that is, say an even number only, or a prime number only. I want it to be displayed near full screen, or as big as possible, but I am not quite sure how to do so. Try PyGame Would I do a loop of some sort? I don't know. I'd need a better description of the problem How would a make it full screen? http://www.pygame.org/docs/ref/display.html#pygame.display.toggle_fullscreen
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now