Computer Architecture and Organization

¡Supera tus tareas y exámenes ahora con Quizwiz!

Derive function x represented by the following circuit. The prime symbol (') has the same meaning as overbar.

(a + b)(a'+b+c')

Which of the following can be called as universal gate? (a) NOT (b) NOR (c) OR (d) AND (e) XOR.

(b) NOR

1 GB is ___________bytes.

1 073 741 824

Four 256-word 8-bit PROM chips are used to produce a total capacity of 1024-word bits. How many address bus lines are required? (Pick one.) 4 8 10 16 32

10

A number of disks, a CPU, and the main memory are all connected to the same 10 MHz 32-bit bus. The disk has a transfer rate of 2 MBytes/sec. The CPU and main memory can both keep pace with the bus. How many disks can be simultaneously transmitting?

106 words/s per bus × 1/(.5 × 106) s/word per disk = 20 disks/bus

If a computer uses a 32-bit address, how many different memory locations are there? (Recall 1K=1024)

2^32= 4,294,967,296 or 4 billion locations

The decimal number equivalent to 1100011 will be 98 100 96 99 97

99

According to Boolean algebra A+1 = ______________ A 0 1 A' B

A

15.2 In a computer, what is a bus, and what does it connect?

A bus is a communication mechanism that allows more than one functional computer units to transfer control units or data. It connects multiple hardware components together, particularly memory, I/O devices, and processors.

18.12 Search the Web to find a list of the top 10 supercomputers. How many cores does each have?

According to https://www.statista.com/statistics/268280/number-of-computer-cores-in-selected-supercomputers-worldwide/, the top 10 supercomputers have thousands to millions of cores, ranging from 272,800 to 10,649,600!

The digital circuit that generates the arithmetic sum of two binary numbers of any length is _______________________ Binary Adder Full Adder Half Adder Adder OR gate

Binary Adder

CISC stands for ______________________ Control Instruction Set Completeness Complex Instruction Set Conversion Complex Instruction Set Computer Control Instruction Set Computer Complex Instruction Set Control

Complex Instruction Set Computer

Project Plan

Ever since I started programming, but especially since last summer, I have been quite interested in all forms of machine learning and artificial intelligence. Automated systems like J.A.R.V.I.S in Iron Man as well as more realistic systems like SIRI have inspired me to learn more about how to develop these intriguing machines. Honestly, when it came to this class, I was not very sure how I can apply this course to my preferred career destination, but in the two weeks I have been in this class, I have learned so much about hardware and have a newfound appreciation for it as well as those who create, study, and teach it. Thus, when I was thinking about what my project should be based on, I looked around my room. I have numerous appliances, LED lights, essential oil diffuser, humidifier, AC, and a coffee maker. However, there is no way to link all these together. I would like to come up with a way, at least in theory, to build an automated system for my room. For example, in the morning, the program would slowly turn on the lights, put on a particular essential oil that targets energy hormones within the brain, turn off the AC, and brew some coffee. Then, in the evening, the program would turn off the lights, put on a particular essential oil that deepens sleep, and turns on the AC. This would make going about my daily tasks a whole lot easier since I would not have to worry about these. All in all, my goals are to program a system that conditionally changes appliances in my room (in theory) and to connect these appliances together. That was quite a long introduction, but I will dive into the core of my project plan, which will simply discuss how I will approach the three projects. My first project, the digital logic design, will have numerous designs that implement how my room should work together. For example, if the temperature is below 80 degrees and the time is 11:30 PM, start dimming my lights and turn on the AC. Another example is if the temperature is no higher than 74 degrees in the morning, about 8:00AM, then turn off the AC, brighten the room, and start brewing coffee. These can all be applied to a digital logic design that implements these ideas in a high level form. My second project, the assembly language exploration, is something I am not entirely familiar with. I have not dived into the specifics of that project, but from my understanding from the syllabus and instructional video, I will be looking at storing the temperature and the time in memory and working with those variables using the assembly language. Other than that, I will be focusing on learning how to develop and test my code within that low-level environment. The last project, the Arduino project, is probably the project that will show best the progress I've made taking this course. There are numerous sensors I can use alongside my Arduino, including a thermometer, a humidity detector, and LED lights. I don't think that I will be able to actually hook up my Arduino to the current appliances that I have in my room, but I can demonstrate that same functionality in a smaller scale. For example, I could have three LED lights connected to my Arduino and have them toggle faster to indicate brighter lights and toggle slower to indicate lower lights. I could also measure the humidity and temperature in order to send a message through the web to turn on the AC or diffuser. These are just some ideas I have thought of, but they will be much more developed and focused when the time comes to work on them. This project may be intended for my own use, but I think it could have practical setups in every household. I could add functionality of the appliances all in one place, a mobile application. There are current applications that model these features, but they seem more to be focused on the entire house, rather than a specific room, which does not really apply to students. As I mentioned at the very beginning, I would also like to develop a machine that learns and adopts to what you have chosen in the past to automate that experience for you. Instead of having to tell the system every morning at 8:00AM you would like coffee, but on Saturdays you would like coffee at 11:00AM, a machine would learn that just from your habits. This is the realm that this project could go, and I think it would be extremely helpful for extremely busy college students worldwide.

Programs must reside in the main memory during _______________ Deletion Execution Printing Reading Insertion

Execution

What is the hex address of the 256th memory location? (Note: the first address is always 0) (Recall 1K=1024)

FF (hex)

The binary cell capable of storing one bit of information is called ______ Combination circuit Sequential circuit Clock Latch Flip flop

Flip flop

What are your interests in computer science, computer information systems, and engineering? Tell me about yourself and your background.

I originally wanted to be a Chemical Engineer but then my father strongly advised me to take a Computer Science my senior year of high school. Reluctantly, I struggled and endeavored through that fateful course and I came to appreciate the value and potential that technology can offer. I realized that CS can apply to any field and that its broad reach means that I can definitely find something that I'm both good at and passionate about. I narrowed down by interests to AI and Machine Learning, inspired by J.A.R.V.I.S from Iron Man, but I really don't know much about hardware. I believe I could code the software side, but this course should help me understand, at least better understand, how to build and improve hardware and expand my knowledge. Maybe one day I will build my own JARVIS.

The function of the ________________ is to store programs and data. CU (Control Unit) MU (Memory Unit) ALU (Arithmetical Logic Unit) INPUT device OUTPUT device

MU (Memory Unit)

Which one of the following is a memory whose duty is to store most frequently used data? Main memory Cache memory ROM Auxiliary memory PROM

Main memory

A Set of Physical Addresses is called ________________ Memory space Disk space Address space Location Pages

Memory space

What are your expectations for this course? What do you hope to learn? What makes for the best learning environment for you?

My expectations for this course are to understand hardware. Overall, I believe that is a big gap in my current knowledge of technology. Throughout my short time working at IMT as a software developer, I have often heard of making programming solutions that do not negatively impact hardware (take less processing power, etc). I would like to understand why and how to implement these resolutions. My best learning environment, at least in this online format, is to be able to go on my own pace, but have set deadlines so I do not procrastinate or push it off.

4.4 Although CPU manufacturers brag about the graphics accelerators on their chips, some video game designers choose to keep the graphics hardware separate from the processor. Explain possible motivations for keeping it separate.

Possible motivations for video game designers keeping the graphics hardware separate from the processor is to separate the two functionalities. Instead of worrying about processing power while rendering graphics, the two hardware components don't really worry about how their job affects the other. One will just process the game, while the other renders the image on the display. If they were both on the same chip, the machine may have to leverage their processor over the graphics, or vice versa, which would definitely affect performance.

RISC stands for ____________________ Reduced Instruction Sign Computers Reduced Instruction Set Computers Reduced Instruction Set Carry Reduced Invalid Set Computers Reset Instruction Set Computers

Reduced Instruction Set Computers

As we finish up the class, what have you liked most about the class components? Any suggestions for modifications or improvements? Do you have any recommendations for future students?

The part that I have liked the most about the class components have been the Projects. They have allowed me to get hands on experience on hardware and programs, such as Assembly, that I have never used before. I would suggest improving the class by including lab work during class. Instead of lecturing for two to three hours, a time in between to work on the Projects or the homework would provide a healthy reprieve from PowerPoints or Videos, particularly when virtually learning. My recommendations for future students is to start your Projects early and to try to understand as much as you can. Building the projects may take some time and be difficult, but they teach you a lot.

What have you liked most about the class components so far? What do you like and dislike about the project work so far? Any suggestions for modifications or improvements?

The parts I have liked most about the class components is the hands on work with architecture, particularly the three projects we have this semester. I am not familiar with this kind of programming so learning about it via direct experience has taught me quite a bit. The thing I like the most about the project work is trying to figure out how it all works. I am individualistic so learning by myself about little things here and there stick to me more than a lecture would. The thing I dislike the most about the project work is the repetitiveness. I believe that my project quality decreases when I have to make three programs instead of one or two. I would argue that the class is going pretty well. One modification/improvement would be to limit the project work to one or two programs in each so that the programs are the best quality.

17.3 Explain the use of an output queue in a device driver by describing how and when items are inserted in the queue, as well as how and when they are removed.

The use of an output queue in a device driver is passing down instructions from the software application to the bus in the hardware. The application performs a write operation on the driver which passes the data item into the output queue. The driver then gets the next request from the queue, implementing a FIFO strategy that then performs interruptions on the hardware. This way, the high level software application is not concerned with hardware implementation as it just passes instructions/data through the driver into the queue.

Provide a summary of your three Aruino designs you are demonstrating in this project.

The three Arduino projects that I built are the following: a button that randomly changes the color for a RGB LED, two buttons that have a color assigned to them, and an LED that turns on when there is little to no light in the room. First Project This first project randomly changes the color of a RGB LED light. When the user hits the button, the program selects a random color, i.e. variation of RGB, and updates the RGB light with the new color for a predetermined amount of time. This project taught me about how to set up an input and output as well as the importance of resistors. The button was set up as an input, so the program read the value from the button, while the RGB lights were set up as outputs, so the program would send values (voltage) to them. Lastly, I had to add resistors so that I would not send too much voltage to the button or the RGB light. Second Project The second project has two buttons that change the color of a RGB light. When I was young, we used to play a game as a class. Each of us would have a button and the teacher would ask us a question. Whoever pressed their button first would change the color of a light on the main board. We would then have to answer the question within a certain time frame. This project replicates that idea. There are two buttons on the Arduino board. One turns the RGB green and the other turns the RGB blue for five seconds. The hardware is set up similarly to the first project. I simply had to replicate the hardware for the button I had in the first project to add a second button this project. Third Project This last project has two buttons that change the color of a RGB light and also adds a buzz each time. I have not dabbled in the music industry professionally, but I have seen a lot of boards that use this kind of setup. There are a bunch of buttons that when pressed, light up a certain color and emit a note or a beat. This is the closest I believe I could get to that kind of setup. One button is assigned the color red, the other is assigned the color blue. When the button is pushed, the buzzer emits a frequency. The first button emits a lower frequency while the second button emits a higher frequency. In terms of hardware, the only hardware I added was setting up the buzzer.

Upload a picture of your second digital design and any description you want to include

This second digital design compares two bits and returns whether the first one (the input on top) is greater than (the output on top), equal to (the output in the middle), or less than (the output on the bottom).

Is the follow code correct that solves for the following problem? Define a SPARC macro mov that copies its first argument (a literal) into its second argument (a register). For example, the code mov 10, %r24 copies 10 into register %r24. PROPOSED SOLUTION .macro mov arg1,arg2 orcc %r0, arg1, arg2 .endmacro

True

Given an architecture that implements the following instructions, choose the best answer describes what the following does.

When the code finishes execution: (1) A is incremented by 2; (2) B has the original value of A; (3) The stack is restored to its original state.

What questions would you like to ask at our meeting with a Logos representative? Describe your thoughts on how you will engage in faith integration in your future career.

Why is Bible software needed? What is the Logos mission statement? How hard is it to maintain Logos? In my future career, I hope to engage in my faith by embodying Christ-like love in the workplace. I don't think I'd like to work in a Christian institution, as that is all I have been involved in throughout my entire life. I would love to work in an environment where I can show others the grace and love of Jesus Christ.

Given the figure below determine the equivalent Boolean function for x. Note that a tick mark " ' " after a letter means inverse or negate.

X = A'B'C' + AB'C' + A'B'D

Which of the following statements is true with regard to Computer B's method of representing floating-point numbers over Computer A's method?

the range is increased but the precision is decreased

Copy the text of your second MARS program into this question.

# Loop Code.text.globl mainmain: # Print messageli $v0, 4 # load instruction 4 (print string) into registerla $a0, msg1 # load message into registersyscall # execute instruction (print message string)# Get value from user and saveli $v0, 5 # load instruction 5 (read integer) into registersyscall # execute instruction (read integer)move $t0, $v0 # set value read into register# Initialize to registers (set to 0)li $t1, 0li $t2, 0loop:addi $t1, $t1, 1 # i = i + 1 (add immediate 1 - increment)add $t2, $t2, $t1 # sum = sum + i li $t2, 1 # load value into register# Print valueli $v0, 1 # print_string syscall code = 1move $a0, $t1 # move value into registersyscall # execute instruction (print value)# Print newlineli $v0, 4 # load instruction 4 (print string) into registerla $a0, lf # load new line into registersyscall # execute instruction (print message string)beq $t0, $t1, exit # if i = N, continuej loop # else continue loop exit:li $v0, 4 # load instruction 4 (print string) into registersyscall # execute instruction (print message string) # Print sumli $v0, 1 # print_string syscall code = 1move $a0, $t2 # move sum into registersyscall # execute instruction (print sum) # Print newlineli $v0, 4 # load instruction 4 (print string) into registerla $a0, lf # load new line into registersyscall # execute instruction (print message string)# exitli $v0, 10 # load instruction 10 (exit)syscall # execute instruction (exit) .data # runs messagemsg1: .asciiz "Loop from numbers 0-9"lf: .asciiz "\n"

A single-user workstation is attached to a local network. The workstation accesses files over the network from a file server. The average access time is 0.09 seconds per page. A similar stand-alone workstation accesses files from its own local disk with an average access time of 0.03 seconds per page. A particular program accesses and processes a 300-page file. The time to process the file once the data is in memory is 45 seconds. What is the ratio of the total time to access and process the file for the local network workstation to the total time for the stand-alone workstation?

(B) 4/3

Copy the text of your first MARS program into this question.

.data # store prompt in a stringstr1: .asciiz "Enter the number: ".align 2 # move to a word boundary # reserve a space to store the resultres: .space 4 # reserve 4 bytes .text.globl main # allow referencing in main main: li $v0, 4 # load instruction 4 (print string) into registerla $a0, str1 # load prompt into registersyscall # execute instruction (print prompt)li $v0, 5 # load instruction 5 (read integer) into registersyscall # execute instruction (input integer)move $t0, $v0 # move value read into register add $t1, $t0, $t0 # double value sw $t1, res($0) # store value in memoryli $v0, 1 # load instruction 1 (print integer) into registermove $a0, $t1 # set doubled value in registersyscall # print doubled integerli $v0, 10 # load exit instruction into registersyscall # exit

Copy the text of your third MARS program into this question.

.text.globl mainmain:# Print messageli $v0, 4 # load instruction 4 (print string) into registerla $a0, msg1 # load message into registersyscall # execute instruction (print prompt)# Get value from user and saveli $v0, 5 # load instruction 5 (read integer) into registersyscall # execute instruction (read integer)move $t0, $v0 # set value read into register# Initialize threshold to 74li $t2, 74# Compare valuesmove $t1, $v0 # set value read from user in registerblt $t1, $t2, coldTemp # branch to coldTemp label if colder than 74 degreesbgt $t1, $t2, hotTemp # branch to hotTemp label if hotter than 74 degreescoldTemp:# Print messageli $v0, 4 # load instruction 4 (print string) into registerla $a0, msg2 # load message into registersyscall # execute instruction (print message string)# Print newlineli $v0, 4 # load instruction 4 (print string) into registerla $a0, lf # load new line into registersyscall # execute instruction (print message string)b exit hotTemp:# Print messageli $v0, 4 # load instruction 4 (print string) into registerla $a0, msg3 # load message into registersyscall # execute instruction (print message string)# Print newlineli $v0, 4 # load instruction 4 (print string) into registerla $a0, lf # load new line into registersyscall # execute instruction (print message string)b exit exit: # exitli $v0, 10 # load instruction 10 (exit)syscall # execute instruction (exit) .data # runs messagemsg1: .asciiz "Enter Temperature: "msg2: .asciiz "Temperature is too cold! Turn AC off."msg3: .asciiz "Temperature is too hot! Turn AC on."lf: .asciiz "\n"

The binary representation of the hexadecimal number 3B7F is (choose one): 0100 1001 1110 1101 0011 1011 0111 1111 0010 0100 0000 1010 0110 0011 1011 1100 1101 1100 1011 0101

0011 1011 0111 1111

A program is running on a pipelined computer in which every fourth instruction is a jump (or a branch), and there is a 20% probability that each jump is taken. When a jump is taken, the pipeline is flushed, which has a branch penalty of 3. Compute the average instruction time in terms of instruction cycles.

1 + PbPtb = 1 + (.25)(.20) x 3 = 1.15

If a virtual memory system has 4 pages in real memory and the rest must be swapped to disk, determine the hit ratio for the following page address system. Assume memory starts empty. Use the First In First Out (FIFO) page replacement policy. Choose the closest answer. PAGE REQUESTS: 2 5 3 4 1 4 7 2 1 3 1 7 4 5 4 6 10% 15% 25% 31% 50%

10%

14.5 USB is classified as a serial interface. What does the classification mean?

A classification of a serial interface means that only one bit can be transferred at any time. For a USB, this is advantageous because there are fewer wires and less interference when using a serial interface.

What are a few key points for you so far that you have learned in the course? Provide some key summary points from Comer chapters 1 -3.

In Discrete Structures, we often focused on designing a circuit that worked. One key point that I learned from the reading and the lecture is that different gates have different number of transistors so one particular gate may be more efficient than another. While a circuit may work one way, there are definitely more efficient and effective solutions that may not be entirely obvious. Another key point that I learned is how the internal clock mechanism works. It's interesting that a delay in the circuit causes the boolean values to fluctuate at specific intervals. I never knew how that worked! The main points from Comer (ch. 1 to ch. 3) are the fundamentals of digital logic (logic gates, propagation delay) and data and program representation (byte size, unicode, floating points).

Identify the addressing mode, which has instruction specifying a register which contains the memory address of the operand. Register mode Direct addressing mode Relative addressing mode Indirect addressing mode Register indirect mode

Indirect addressing mode

What are a few key points for you so far that you have learned in the course? Provide some key summary points from Comer chapters 11 to 13.

A couple key points I have learned so far in this course is that parallel hardware is important for speed and efficiency, especially when it comes to storing and retrieving values from memory. Learning about how a cache and virtual memory works below the surface has allowed me to understand exactly why these practices are valued in computer architecture and impact both hardware and software. Chapter 11 Physical MemoryUnderlying Technologypermanence (RAM or ROM)clock synchronizationread/write cycle timesMemory Organizationmemory is organized into words and accessed through a controlleruse word-addressingaddress space and bytes per word are powers of two Programming Languages (such as C)provide pointer variables and pointer arithmeticallows a programmer to obtain and manipulate memory addressesMemory dumpshows the contents of memory along with the memory address of each locationused to relate data structures in a program to values in memoryMemory Modulesbanks are used to organize a large memory out of smaller modulesInterleaving places words of memory in separate modules to speed access Content Addressable Memory (CAM)combines memory technology and organizationorganizes memory as an array of slots - high speed search Chapter 12 Cachingfundamental optimization techniqueintercepts requests, automatically stores values, and answers requests quicklymultilevel cache hierarchy / preloaded cachesmost computer systems employ a multilevel memory cacheL1 - resided alongside a processor / single coreL2 - located external to the processor / multiple coreL3 - associated with the memory / multiple coreDirect mapped memory cachehandles lookup without keeping a list of cached itemsdoes not need a processorSet associative memory cache - direct mapped memory cache with parallel access Chapter 13 Virtual Memory Systempresents an abstract address space to a processor and to each application programhides details of the underlying physical memoryoffers convenience for programmers, support for multiprogramming, and protectionprovides each program with an address space that begins at 0makes physical memory and page sizes a power of twoallows hardware to translate addresses without an ALU Virtual Memory Architectureshide details of word addressing / present a uniform address space Virtual Memory Technologiesbase-boundsegmentationdemand pagingmost popularuses page tables to map from a virtual address to a physical addressuses a high speed search mechanism (TLB) Ambiguity Problemwhen multiple applications / processes use the same range of virtual addressesOS can either flush the cache whenever it switches applications or use long addresses where the high order bits consists of an address space ID (most likely the process ID)

17.1 What does a device driver provide, and how do device drivers make it easier to write applications?

A device driver provides an interface between an application program and an external hardware device. They make it easier to write applications because a software developer does not have to focus on low level code as well as the details of the hardware device. They just have to focus on interacting with the device on a high level.

What are a few key points for you so far that you have learned in the course? Provide some key summary points from Comer chapters 22 and 23.

A few key points that I have learned in this course, starting from the very beginning, is that computers are built on digital logic. As we dived further into the material, the digital logic made possible more complex components such as logic gates, which made possible larger components, such as the Arithmetic Logic unit, and so far and so forth. Learning about the architecture of a computer, albeit from a pretty high level, allows me to have a newfound appreciation for hardware in general, as well as those who build and maintain it. Chapter 22 Digital System Architecture - can be viewed at several levels of abstractionSystem-level architecture - structure of an entire computer systemBoard-level architecture - structure of each boardChip-level architecture - internal structure of an integrated circuit At each successive level, details are revealed that remain hidden in previous levels Chapter 23 Modularity - used by both hardware and software engineersSoftware - subprogramHardware - replication of a basic building block

What are a few key points for you so far that you have learned in the course concerning faith integration? Provide some key summary points from Comer chapters 18 to 21. Provide some summary comments on Bloom's book.

A key points I have learned so far regarding faith integration is that Christian researchers developed the scientific method. While civilizations often struggled with science, it was only the Christians within the Renaissance who spurred on science and where we are today. Another key point is that faith integration in the workplace is not always something you proclaim, but is evident in simply being a good employee and treating one another with respect and love. Embodying Christ throughout the workday is using your faith in your work. Chapter 18 Parallelism - fundamental optimization technique used to increase hardware performanceMost components of a computer system contain parallel hardware: includes parallel processorsExplicit parallelism - gives a programmer control over the use of parallel facilitiesImplicit parallelism - handles parallelism automatically. Uniprocessor computerSISD architecture - single instruction operates on a single data item at any given timeSIMD architecture - allows an instruction to operate on an array of valuesinclude vector processors and graphics processorsMIMD - multiple, independent processors that operate simultaneously and can each execute a separate programinclude symmetric and asymmetric multiprocessors General-purpose multiprocessor with N processors should perform N times faster than a single processorperformance of a multiprocessor does not increase linearly as the number of processors increasesoverhead means that performance can decrease as additional processors are added. Supercomputerconsists of a large cluster of processorswork on subparts in parallel Chapter 19 Pipeliningsoftware pipelining - arranges a set of programs in a series with data passing through them that can be used on hardware that does not provide pipelininghardware pipelineinstruction pipeline - handle machine instructionssuperpipeline technique - stage of a pipeline is further subdivided into partial stagesdata pipeline - arbitrary data is transferred through the pipeline does not decrease the overall time required to process a single data itemincrease the overall throughput Chapter 20 Power - instantaneous measure of the rate at which energy is usedEnergy is the total amount of power used over a given timeDigital circuit - dynamic or switching power and leakage power Power consumption can be reduced by making parts of a circuit inactive, reducing the clock frequency, and reducing the voltagereducing the voltage has the largest effect - but also increases delay Power density - concentration of power in a given space, related to heat Power wall - "limit of approximately 100 watts per cm2 that gives the maximum power density for which heat can be removed from a silicon chip using current cooling technologies" Clock gating and power gating can be used to turn off a circuit Battery power - goal is a reduction in total energy usesleeping is only justified if the energy required for sleep mode is less than the energy required to remain running Chapter 21 Performance Measuresaverage number of floating point operations a computer can perform per secondor the average number of instructions the computer can execute per secondor the weighted average in which an instruction that is used more often is weighted more heavilyWeights - derived by counting the instructions in a program or a set of programscorrespond to an instruction mix. Benchmark - refers to a standardized program or set of programs used to assess performancechosen to represent a typical computationSPECmarks - some of the best-known benchmarksmeasures performance of various aspects of integer and floating point performance and remote file access Amdahl's Law - helps architects select functions to be optimizedexample: moved from software to hardware or moved from conventional hardware to high-speed hardwarestates that functions to be optimized should account for the most timeexplains why parallel computer systems do not always benefit from a large number of processors Bloom The main point of Bloom's Natural Sciences is that the Christian worldview often provides answers for scientific inquiry and provides the best "framework" for Christians to interact with and understand pursuing scientific knowledge.

9.1 State and explain the characteristics of a low-level language.

A low-level language has the following characteristics: one-to-one translation, hardware dependence, systems programming orientation, special-purpose, and few abstractions. One-to-one translation means that the language corresponds each individual statement to a single instruction on the processor. Hardware dependence means that the language created for one processor cannot be used on another processor due to its one-to-one translation. Systems Programming Orientation means that the language has facilities that allow the programmer to create an operating system or other software that directly interacts and controls the hardware. purpose means that low-level languages are only used where extreme control or efficiency is needed. Few abstractions means that these low level languages do not provide complex data structures or control statements, forcing the programmer to construct abstractions from low level hardware mechanisms.

The combination circuit given below is implemented with two NAND gates. To which of the following gates is it equivalent?

AND

5.6 Classify the ARM architecture owned by ARM Limited, the SPARC architecture owned by Oracle Corporation, and the Intel Architecture owned by Intel Corporation as CISC or RISC.

ARM architecture - RISC SPARC architecture - RISC Intel Corporation Architecture - CISC

How many bits should the address bus and the data bus be to support a 64Kx128 memory? (Recall 1K=1024)

Address bus = 16 bits. Data bus = 128 bits

Which one of the following can be used for checking errors in transmission? Full duplex Half duplex CRC Full adder Binary adder

CRC - Cyclic Redundancy Check

What are examples of faith and science integration models that commonly expressed in society today?

Examples of faith and science integration models that are commonly expressed in society today are how people interact within their work environment and what drives and motivates people within their field. First, for some, they try to build and maintain relationships within their environment that are holy and pleasing to God. In the secular world, talking about God is prohibited, but acting like Christ is not. A way these computer scientists can implement their faith in their work is by embodying Christ and treating everyone with love and respect. Secondly, some faith based computer scientists choose to allow their faith to motivate their career decisions. For staff members at APU, this is especially relevant. They are often paid below industry standards, but their love for God and others motivate them to work for less pay. For others, studying how AI can help improve their field, or technology in general, motivates them to try to help others as much as they can through their technology.

True or False (choose one): The purpose of virtual memory is to increase the speed of main memory, and the purpose of cache memory is to increase the size of main memory.

False

True or False :The purpose of virtual memory is to increase the speed of main memory, and the purpose of cache memory is to increase the size of main memory.

False

2.5 Use the Web to read about flip-flops. List the major types and their characteristics.

Flip-Flops Simple set-reset latchesmost fundamental latchuses static gatesconstructed from a pair of NOR or NAND gates Gated latches and conditional transparencyalternate transparent latches (rely on input) with non-transparent latches (do not rely on input) D flip-flopdata or delay flip-flopoutputs only on rising edge (when voltage changes from 0 to pos, not from pos to 0) T flip-flopchanges state whenever there is input (voltage changing from 0 to pos, or from pos to 0) JK flip-flopa flip-flop that allows set, reset, and maintaining of the current statecan be configured to work as a simple, D, or T flip-flop

What questions would you like to ask our guest lectures later in the semester?

How important is it to understand the extremely low level details of computer architecture? Is it necessary to know hardware well to be successful in the Computer Science field? What does the future of digital computing look like?

9.12 Compare the x86 and ARM versions of the Fibonacci program in Figures 9.10 and 9.11. Which version do you expect to require more code? Why?

I expect the ARM version to require more code because that processor does not have variable length instructions. For example, merely moving a value with the ARM version of the Fibonacci program requires twice as many lines due to having to move the lower 16 bits and the upper 16 bits. While this allows for more flexibility, this requires more code.

What have you liked most about the class components so far? Any suggestions for modifications or improvements?

I have no qualms about any of the class components. The reading is quite a lot and even though it is high level and not too difficult to understand, it can be overwhelming at times. However, I think it is manageable and thus I don't have any suggestions for modifications and improvements.

13.16 If a memory system caches virtual addresses and each process has a virtual address space that starts at zero, what must an operating system do when changing from one process to another? Why?

If a memory system caches virtual addresses and each process has a virtual address space that starts at zero, then the operating system must flush the cache when switching from one process to another. If multiple applications have access to the same virtual address in the cache, there can be dire consequences since they will be unknowingly affecting each other's memory. Flushing the cache means that the new process will not be affected or affect another process' memory.

Upload a picture of your third digital design and any description you want to include

My third digital design is a simple design I built in order to test my ability to decipher a series of gates into a mathematical boolean expression. After creating this design, I was able to interpret it as the following boolean expression: (AB + ABC + ABC)

Provide an introduction to your three Digital Logic Designs.

My three digital logic designs are not all directly related on my project plan bar one. The first one I created was a logic design that used three inputs (temp, humidity, time) and had four outputs (AC, Essential Oil Dispenser, Humidifier, LED Lights). I configured the system to send voltage to the outputs based on low/high temperature, low/high humidity, and sleep/awake times. The second one is a basic 2 bit magnitude comparator. I looked up the basic logic and just plan to convert this into gate logic in the DLD environment. I do not necessarily plan to implement this in my project because I am using high level comparators for control logic (>, >=, ==, !=, <, <=) but I thought it would be useful to learn by working with this low level design. The last one is just a design I came up with and then tried to find the equivalent boolean algebraic expression, which I will reveal later.

5.1 When debugging a program, a programmer uses a tool that allows them to show the contents of memory. When the programmer points the tool to a memory location that contains an instruction, the tool prints three hex values with labels: OC=0x43 OP1=0xff00 OP2=0x0324 Describe what the labels and each field mean

OC is the opcode, while OP1 is the first operand and OP2 is the second operand. I believe that opcode 0x43 is the code to store the summation of the operands provided while OP1 (0xff00) is the decimal number 65280 and OP2 (0x0324) is the decimal number 804.

Describe some of the key assembly language programming concepts you have learned from the MARS project and the things you have learned in this course.

One of the key assembly language programming concepts I have learned from the MARS project is that you have to define an instruction in a register in order to perform a system call. In high level languages, I have always just used single statements to run a particular command. In MARS, I had to rethink how to develop my interactions, so I had to move values within the registers and then pass in an instruction in the "instruction" register in order to execute a statement. Another key assembly language programming concept I have learned is commenting code. With assembly, it is so low level that you cannot understand what is happening merely by reading code unless you are quite experienced. I commented nearly every line of code that I wrote in MARS. I am also writing more comments in the code I write in high level languages such as JS and Python.

Describe some of the key concepts you have learned programming an Arduino UNO.

One of the key concepts I have learned programming an Arduino is defining inputs and outputs on the device. I learned this also in IoT, but for example, you must define a pin to be used as an LED light or Button input and other I/O devices. Another concept I have learned in terms of programming an Arduino is the setup versus the loop portion of the code. I never really understood why there were two necessary portions to the code, but after learning about parallel hardware, it makes sense why there is a infinite loop for the hardware. The setup runs once while the loop runs repeatedly. After learning about hardware architecture, I have a newfound appreciation for the necessity of the Arduino software setup.

5.5 A computer architect boasted that they were able to design a computer in which every instruction occupied exactly thirty-two bits. What is the advantage of such a design?

Since every instruction occupied exactly thirty-two bits, the processor instruction set is fixed-length. There are many advantages to this kind of set, but the main ones that come to mind is that fixed-length instructions require less complex hardware than variable-length hardware and that fixed-length instructions operate faster because the hardware knows the size of the instructions and operands and so can quickly fetch them and also quickly compute the location of the next instruction.

11.1 Smart phones and other portable devices typically use DRAM rather than SRAM. Explain why.

Smart phones and other portable devices typically use DRAM rather than SRAM because SRAM is generally more expensive and has less storage while DRAM is cheaper and has more storage and is less dense. Portable devices desire to have cheap, lightweight but bigger storage due to their small size. Using a more expensive and less storage capacity memory is not financially viable for smart phone and portable device hardware manufacturers.

What are a few key points for you so far that you have learned in the course? Provide some key summary points from Comer chapters 14 and 15.

So far, I have learned a lot more about how input/output devices work within a computer architecture. I stream video games, so I often have to plug in a microphone, an external camera, and a game capture device into my MacBook. I never really gave much thought about how it all worked but understanding that an interface hardware separates each device struck me since I always wondered how adapters with multiple inputs worked without overloading the computer. Additionally, learning about how buses work and how they interconnect all the parts of the architecture we have talked about this semester is really important and fundamental to understanding how it all fits together. Chapter 14 Computer systems' interaction with external devicescontrol the devicetransfer data External Interfaceserial approach (only one bit of data can be transferred at a time)parallel approach (multiple bits of data can be transferred at a time)number of bits that can be sent is known as the widthInterface Performancelatency - time required to send a bit from a source to a destinationthroughput - number of bits that can be sent per unit timeInterface Hardwaredesigned to multiplex large data transfers over fewer pinsmultiple external devices can attach to a single external connectioncontroller communicates with each device separately Chapter 15 Busfundamental mechanism used to interconnect memory, I/O devices, and processorsoperate in parallelconsists of parallel wires that permit multiple bits to be transferred simultaneouslyeach bus defines a protocol that devices use to access the busfetch-store paradigman I/O device connected to the bus is designed to receive fetch/store operations and interpret them as operations on the deviceBus Protocolthree sets of information (Control Information, Address Information, Data)a bus does not need independent wires for each set of information because a bus protocol multiplexes communication over a small set of wiresBridgeadds multiple auxiliary buses to a computer by mapping all or some of the auxiliary buses' address space onto the address space of the computer's main busno defining unassigned address spacesAlternative to Busesswitching fabricachieve higher throughput by using parallelismsignificantly more expensive than a bus

What are a few key points for you so far that you have learned in the course? Provide some key summary points from Comer chapters 16 and 17.

Some key points that I have learned so far from this course is how I/O works on a low level as. well as how device drivers function. When I work, I often have numerous devices plugged into my Macbook and I always wondered how the computer determines what takes precedence over the other when pressed at the same time. I now realize that inputs have a certain priority assigned to them and interrupts from a certain device has higher priority over another. Additionally, I knew about device drivers but never knew how they functioned. I think it is important and interesting that drivers operate on a low level and allow applications to interface with the hardware. Chapter 16 Programmed I/Orequires a processor to handle each step of an operation by polling the deviceprocessor spends many cycles waiting for the device Interrupt-Driven I/Oallows a device to perform a complete operation before informing the processorprocessor has additional hardware that tests once during each fetch-execute cycle whether or not the device has requested an interrupt InterruptsVectored - interrupting device supplies a unique integer that the processor uses as an index into an array of pointers to handlershardware saves and restores state information during an interruptMultilevel - give some devices priority over others Chapter 17 Aspects of I/O important to programmersSystems Programmer - needs to understand low-level details of the device when writing driver codeApplications Programmer - needs to understand relative costs when using I/O facilities Device Driverupper half - interacts with application programsreceives control when an application reads/writes datalower half - interacts with the device itselfreceives control when the device generates an input/output interruptset of shared variables Bufferingtechnique used to optimize sequential I/O performanceused for both input and outputoften implemented in a run-time libraryFlushgives an application control over when data is transferredallows buffering to be used with arbitrary applications

23.2 How does the ability to pass arguments to functions help programmers control the complexity of software?

The ability to pass arguments to functions help programmers control the complexity of software by allowing other programmers can invoke the functions without writing the code themselves and without needing to understand the algorithms being used. Subprograms allow programmers to work at a higher level, meaning that they can be much more productive and the resulting software will contain fewer errors. Additionally, when building modularized software, a single copy of each subprogram exists and the only change among invocations consists of the actual arguments supplied when the subprogram is invoked, so the errors are more likely to be function arguments rather than the function itself.

16.5 Read about devices on a bus and the interrupt priorities assigned to each. Does a disk or mouse have higher priority? Why?

The disk has higher priority because the hardware directly interacts with the hardware while the mouse requires user input . Moreover, operations with the disk are more low-level than operations with the mouse so an interrupt by the disk would be more important and have higher priority.

What are a few key points for you so far that you have learned in the course? Provide some key summary points from Comer chapters 9 and 10.

The key points covered in the past two chapters (chapters 9 - 10) are assembly languages, programming paradigms, memory, and storage. Assembly Languages and Programming Paradigms Assembly languages are low-level languagesincorporate characteristics of a processor (instruction set, operand addressing modes, registers)many different kinds of languages exist (for each type of processor) but follow the same basic structureeach statement in assembly corresponds to a single instruction in the hardwareconsists of an optional label, opcode, and operandsassembly defines a synctatic form for each operand Assembly language sequencesconditional execution, conditional execution with alternate paths, definite iteration, indefinite iterationcalling subroutines or separate functionsargument passing, return address storage, and return of values to a caller differsome place the arguments in memory, others pass them in registers Assemblersoftware that translates assembly language code into binary codemakes two passes over the source codeone to assign addresses and the other to generate codemacro facilitygenerates a source program which can then be assembleduses textual substitution - can lead to illegal code and errors detected by the assembler Memory and Storage Two key aspects of memory are the underlying technology and the organization Technologiesvolatile or nonvolatilerandom or sequential accesspermanent or nonpermanent (read-only or read-write)primary or secondary To achieve best performance, an architect organizes memory hierarchicallysmall amount of high performance memorylarge amount of low performance memory Fetch-store paradigm (only supports two operations)one retrieves a value from memorythe other stores a value into memory

What are a few key points for you so far that you have learned in the course? Provide some key summary points from Comer chapters 6-8.

The key points that I have learned from the past two weeks of reading have been data paths, instruction execution, operand addressing, instruction representation, and CPUs (particularly the microcode, hardware protection, and processor modes) Chapter 6 A computer system is programmable (executes instructions from memory) Programmability providessubstantial computational powerflexibility (loading new programs into memory) Computer consists of multiple hardware components (program counter, memories, register units, ALU)connections among components form data pathsbasic instructions: fetch, decode, execute, register and data accessthe 'controller' has connections to each of the hardware unitsmultiplexer (switch that allows data from one of multiple sources to be sent to a given output) Chapter 7 Designing a processorarchitect chooses number and types of operands (number limited to three or fewer) Operandsimmediate value (constant)contents of a register or value in memoryindirection vs double indirection (memory address vs memory address to memory address)type can be encoded in the opcode (implicitly) or explicitly Variations exist based on functionality, ease of programming, and processing speed Chapter 8 CPU - complex processor that uses multiple modes of executionmode determines operational parameters (operations allowed, privilege level)offer at least two levels of privilege (one for the OS and one for applications)built with two levels of abstraction (microcontroller, macro instruction set) MicrocodeRISC processor - microcontroller that uses vertical microcodeset of procedures that correspond to a macro instructionfetch-execute cycleHorizontal microcodeschedule functional units to operate on each cycleinstructions for each hardware based on a bit field Advanced CPUscoreboard mechanismhandles cases where the results of one execution are needed in an instructionconditional branches

What are a few key points for you so far that you have learned in the course? Provide some key summary points from Comer chapters 4 and 5.

The key points that I learned from this week's reading are the different kinds of processors, computational engines, and instruction sets. Processors and Computational Engines Processors are digital devices that perform computations involving numerous steps. Processors can be fixed, selectable, parameterized, or programmable. A computational engine is a subprocessor. Processors can be used in different roles (coprocessors, microcontrollers, embedded processors, general purpose processors). Programmable processors are processors that are physically separate from the program it runs. Computer software translates source code into the binary representation that a program that the processor can run requires. Instruction Sets Each processor has an instruction set that has operations that the processor can perform. Instructions in the set can be fixed-length or variable-length. Processors include general-purpose registers that can be divided into banks (also specialized registers). Processors can be classified into two broad categories based on whether they have complex (CISC) or minimal (RISC) instructions.

Provide an introduction to the three MARS programs you are submitting.

The three MARS programs that I am introducing are programs that represent C control flows as well as input/output. The first project is getting a user input and doubling the integer. Throughout many of the applications we write in high level languages, we do a lot of arithmetic. Understanding and coding a low level language that manipulated an integer allowed me to understand how the hardware processes arithmetic operations. The second project is a for loop. For my job as a software developer. I utilize for loops and while loops when dealing with many rows of data sent over the web. It was very informative learning how coding loops is vastly different in assembly than high level languages like JavaScript and Python. The last project I have is a temperature checker. The user inputs the temperature and outputs whether or not the AC should be turned on. The idea seems quite basic, but it is probably the core of my overarching project. A key part of my room system is making sure to optimize appliances in the room, so a system that determines when the AC should be turned on and off relates to that idea.

Upload a picture of your first digital design and any description you want to include

This first design was quite difficult to build because it is not easy to build individual logic gates based on high level control logic. In this case, I used three inputs (tmp, humidity, time) as I mentioned in the introductory paragraph. I will go over the outputs from top to bottom. The first output, AC, will only turn on if tmp is 1 (high) and time is 1 (awake). The second output, Essential Oil Dispenser, will only turn on if tmp is 0 (low), humidity is 0 (low), and time is 1 (awake). The third output, Humidifier, will only turn on if humidity is 1 (high) and time is 1 (awake). The last output, LED lights, will only turn on if time is 1 (awake). This is a basic implementation and my subsequent projects will dive into individual pieces in more detail. I felt that if I was more specific in my design, I would've made mistakes that would've broken my logic.

Provide examples of the historical context that Christianity has made for doing science

Throughout the Renaissance, orthodox Christians were key in the development of the scientific method. Throughout the 20th century, Christian scientists were important in building vaccines for terrible diseases such as polio and measles. Throughout the last millennium, Christian mathematicians, such as Pascal, are instrumental in how we interpret algebra and calculus today.

Submit a picture of your first layout, a drawing or schematic of your layout, and paste the code for your Aruino .ino script.

const int buttonPin = 3;const int redPin = 9;const int greenPin = 10;const int bluePin = 11; void setup() {Serial.begin(9600);pinMode(buttonPin, INPUT);pinMode(redPin, OUTPUT);pinMode(greenPin, OUTPUT);pinMode(bluePin, OUTPUT);} void loop() {int randomNumber = random(1, 7);if (digitalRead(buttonPin) == LOW) {delay(2000);} // redelse if (randomNumber == 1) {digitalWrite(redPin, HIGH);digitalWrite(greenPin, LOW);digitalWrite(bluePin, LOW);} // greenelse if (randomNumber == 2) {digitalWrite(redPin, LOW);digitalWrite(greenPin, HIGH);digitalWrite(bluePin, LOW);} // blueelse if (randomNumber == 3) {digitalWrite(redPin, LOW);digitalWrite(greenPin, LOW);digitalWrite(bluePin, HIGH);} // purpleelse if (randomNumber == 4) {digitalWrite(redPin, HIGH);digitalWrite(greenPin, LOW);digitalWrite(bluePin, HIGH);} // yellowelse if (randomNumber == 5) {digitalWrite(redPin, HIGH);digitalWrite(greenPin, HIGH);digitalWrite(bluePin, LOW);} // navyelse if (randomNumber == 6) {digitalWrite(redPin, LOW);digitalWrite(greenPin, HIGH);digitalWrite(bluePin, HIGH);} // offelse {digitalWrite(redPin, LOW);digitalWrite(greenPin, LOW);digitalWrite(bluePin, LOW);}}

Submit a picture of your third layout, a drawing or schematic of your layout, and paste the code for your Aruino .ino script.

const int buttonPin1 = 3;const int buttonPin2 = 5;const int buzzerPin = 2;const int redPin = 9;const int greenPin = 10;const int bluePin = 11; void setup() {pinMode(buttonPin1, INPUT);pinMode(buttonPin2, INPUT);pinMode(buzzerPin, OUTPUT);pinMode(redPin, OUTPUT);pinMode(greenPin, OUTPUT);pinMode(bluePin, OUTPUT);} void loop() {// display red light with a low noteif (digitalRead(buttonPin1) == LOW) {digitalWrite(redPin, HIGH);digitalWrite(greenPin, LOW);digitalWrite(bluePin, LOW);digitalWrite(buzzerPin, HIGH);delay(1);digitalWrite(buzzerPin, LOW);} // display blue light with a high noteif (digitalRead(buttonPin2) == LOW) {digitalWrite(redPin, LOW);digitalWrite(greenPin, LOW);digitalWrite(bluePin, HIGH);digitalWrite(buzzerPin, HIGH);delay(40);digitalWrite(buzzerPin, LOW);}}

Submit a picture of your second layout, a drawing or schematic of your layout, and paste the code for your Aruino .ino script.

const int buttonPin1 = 3;const int buttonPin2 = 5;const int redPin = 9;const int greenPin = 10;const int bluePin = 11; void setup() {pinMode(buttonPin1, INPUT);pinMode(buttonPin2, INPUT);pinMode(redPin, OUTPUT);pinMode(greenPin, OUTPUT);pinMode(bluePin, OUTPUT);} void loop() { // turn RGB offdigitalWrite(redPin, LOW);digitalWrite(greenPin, LOW);digitalWrite(bluePin, LOW); // turn RGB green if the first button is pressed, well, firstif (digitalRead(buttonPin1) == LOW) {digitalWrite(redPin, LOW);digitalWrite(greenPin, HIGH);digitalWrite(bluePin, LOW);delay(5000);} // turn RGB blue if the second button is pressed firstif (digitalRead(buttonPin2) == LOW) {digitalWrite(redPin, LOW);digitalWrite(greenPin, LOW);digitalWrite(bluePin, HIGH);delay(5000);}}

Select your answer to the follow question Which of the following operations does function baz in the ARC program shown below carry out? The parameters A and B are passed to the function and returned from it are passed from the stack. B is closer to the stack point than A. Circle one of these operations:

max(A , B)


Conjuntos de estudio relacionados

US Government: 1.04 Lesson Assessment: The Purposes and Origins of Government

View Set

Introduction to Sociology - Test 2

View Set

NU470 Week 9: Evolve Elsevier EAQ Ethics

View Set

Biopsychology Taste/Olfaction Chemical Senses

View Set

Chapter 9 Business Organizations and Securities Regulation

View Set

Canadian Health Information - Law

View Set

4.1.3 Attachment - Romanian Orphan Studies

View Set