Logic operations are one of the fundamental aspects of computer science. In simplest terms logic operations takes one ore more value inputs and outputs a single value. As it relates to this course it is a boolean function where as the input is 0 or 1 and the output is 0 or 1, as defined by the type of operation. Basically Logic Operations are a physical implementation of truth tables.
AND
INPUT | OUTPUT | |
---|---|---|
A | B | A AND B |
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
OR
INPUT | OUTPUT | |
---|---|---|
A | B | A OR B |
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
XOR
INPUT | OUTPUT | |
---|---|---|
A | B | A AND B |
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
Negated Logic Operations work the same way as Logic operations(as defined in keyword 1) except the output is negated. So all boolean outputs are simply switched, if the output is for an AND operation is 0 then NAND would be 1.
The Address bus is a series of lines that connect devices. It is used specifically to specify a physical address. When a device needs to read or write to a memory location it specifies that location on the address bus.
After the Address bus trasnfers the information about the physical address of where the data should come or go, the data bus actually transfers the data.
The Fetch-Execute Cycle is the process of retrieving instructions from memory and implementing any action required by those instructions
Steps of cycle:
The Von Neumann architecture is the general purpose architecture for most modern pc's. It only has one bus used for data and instruction fetches. It typically only has one cache, if any at all, that stores both data and instructions.
The Harvard architecture utilises separate buses for data and instructions. This allows for data and instructions to be fetched simultaneously. Caches are almost always used with this architecture as it adds to its efficiency. Also separate caches can be used for data and instructions. This is not as readily used in the general purpose pc world as it is quite inefficient in processor design, at least compared to von Neumann.
Binary and Hexadecimal are the names of two common number representations used today. There are many others, decimal, or base 10, for example is one anyone reading this should know. 0 through 9. Binary, or base 2, is 0 and 1. Only two values hence its name. Hexadecimal, or base 16, uses 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F. These are different ways to represent quantities. Binary is the most commonly used when working with digital electronics. Processors only deal with two states, aka voltage levels, which we treat as 0's and 1's. Hexadecimal is commonly used for memory addresses for convenience, trying to display it in binary would be less convenient but can be done this way or with any number system. Any value can be represent by any number system, its a matter of convenience, preference, and of course standards that determine what we use.
A Partition is storage space on a hard drive. A hard disk can have multiple partitions thus dividing the hard drive into multiple “virtual” hard drives. It can also have only one partition using the entire disk or a part thus having unused portion of the hard drive.
For keyword 1 I discussed what a partition is, however a partition by itself is useless. It needs a File System. A file system is what we use to organize data on the partitioned hard drive. The file system retains the data on the hard drive and allows the data to be retrieved and updated. The file system also allows for managing the physical space on the hard drive.
There are many types of file systems, Unix based systems typically use ext4 and windows uses NTFS. From the user point of view they do the same t hing they just have different means of managing the partition and all its data.
An *Operating System is a program or a series of programs and applications that runs your computer. It is the most important type of software on a system. It gives users the ability to interact with the system by running applications and accessing system devices. Windows is an example of an operating system, a graphical one to more specific. This gives the user the ability to access the systems resources to “do” various things. Examples being accessing the internet, playing games, sending data to a printer.
When a computer system is first turned on there is no operating system in the ROM or RAM(read only memory, and random access memory). The bootstrap loader is a small program that is stored in rom or on the first sector of the harddrive. The bootloader has the instructions needed to load any operating system stored on the hard drive.
int main() { int a=1, b ; b = !a; printf("a = %d\n", a); printf("b = %d\n", b); return (0); }
lab46:~/Desktop$ ./a.out a = 1 b = 0 lab46:~/Desktop$
int main() { int a=0, b ; b = !a; printf("a = %d\n", a); printf("b = %d\n", b); return (0); }
lab46:~/Desktop$ ./a.out a = 0 b = 1
int main() { int a=99999, b ; b = !a; printf("a = %d\n", a); printf("b = %d\n", b); return (0); }
lab46:~/Desktop$ ./a.out a = 99999 b = 0
int main() { int a=-9436, b ; b = !a; printf("a = %d\n", a); printf("b = %d\n", b); return (0); }
lab46:~/Desktop$ ./a.out a = -9436 b = 0 lab46:~/Desktop$
Another simple one… How do you update your subversion repository and where do you need to be to do so?
The directory of the repository is /home/kkrauss1/src/cpu So we will try to run update from the home directory then each subdirectory until we get an update
lab46:/$ svn update Skipped '.' lab46:/$ cd home lab46:/home$ svn update Skipped '.' lab46:/home$ cd kkrauss1 lab46:~$ svn update Skipped '.' lab46:~$ cd src lab46:~/src$ svn update At revision 17. lab46:~/src$ cd cpu lab46:~/src/cpu$ svn update At revision 113. lab46:~/src/cpu$
As we can see nothing really happens until we get into src. Now our repository is cpu but we did get an “at revision17” at the src level, this is because src is a repository checked out from a different semester. If there any updates made to the files of the repository then it would have updated. Once we get to cpu we see that it says we are at revision 113, now we are where we need to be for this class and it is already updated. So to answer the question of where you need to be to update; you need to be in the directory of the repository.
#include <stdio.h> int main(int argc, char **argv) { return 0; }
karl@joffice2:~/Desktop$ gcc argExperiment.c karl@joffice2:~/Desktop$
#include <stdio.h> int main(int argc, char *argv[]) { return 0; }
karl@joffice2:~/Desktop$ gcc argExperiment.c karl@joffice2:~/Desktop$
*No issues compiling ★argv[] either
#include <stdio.h> int main(int argc, char argv[][]) { return 0; }
karl@joffice2:~/Desktop$ gcc argExperiment.c argExperiment.c:3: error: array type has incomplete element type karl@joffice2:~/Desktop$