Recent content by Aldrasio
-
A
Comp Sci Function 'for' and 'while' in C++
Pretty much, yeah. Here's an example of a for loop application, converting a decimal number to 8-bit binary and storing the result in an array of 1s and 0s (in C, though it shouldn't be much different): int dec = <some integer>; int bin[8]; int i; for (i = 0; i < 8; i++) { bin = dec%2; dec...- Aldrasio
- Post #11
- Forum: Engineering and Comp Sci Homework Help
-
A
Comp Sci Function 'for' and 'while' in C++
Because for loops have syntax that makes it easy to use for situations when you know they need to run a specific number of times (like if you're going through a set-length array), while while loops are better for situations when you don't know when the sequence will need to break (like if you're...- Aldrasio
- Post #9
- Forum: Engineering and Comp Sci Homework Help
-
A
Logic Gates and CPUs: Basic Design Structure of Computer Processors
I'd recommend this book. It starts at logic gates and works its way up to binary arithmetic and machine language, then goes into assembler, compiler, and operating system programming. It also has tools for download and specifications for you to build and program your own virtual 16-bit...- Aldrasio
- Post #8
- Forum: Programming and Computer Science