Modern Computer Architecture and Organization
eBook - ePub

Modern Computer Architecture and Organization

Jim Ledin, Dave Farley

Buch teilen
  1. 666 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Modern Computer Architecture and Organization

Jim Ledin, Dave Farley

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

A no-nonsense, practical guide to current and future processor and computer architectures that enables you to design computer systems and develop better software applications across a variety of domainsKey Features• Understand digital circuitry through the study of transistors, logic gates, and sequential logic• Learn the architecture of x86, x64, ARM, and RISC-V processors, iPhones, and high-performance gaming PCs• Study the design principles underlying the domains of cybersecurity, bitcoin, and self-driving carsBook DescriptionAre you a software developer, systems designer, or computer architecture student looking for a methodical introduction to digital device architectures, but are overwhelmed by the complexity of modern systems? This step-by-step guide will teach you how modern computer systems work with the help of practical examples and exercises. You'll gain insights into the internal behavior of processors down to the circuit level and will understand how the hardware executes code developed in high-level languages.This book will teach you the fundamentals of computer systems including transistors, logic gates, sequential logic, and instruction pipelines. You will learn details of modern processor architectures and instruction sets including x86, x64, ARM, and RISC-V. You will see how to implement a RISC-V processor in a low-cost FPGA board and write a quantum computing program and run it on an actual quantum computer.This edition has been updated to cover the architecture and design principles underlying the important domains of cybersecurity, blockchain and bitcoin mining, and self-driving vehicles.By the end of this book, you will have a thorough understanding of modern processors and computer architecture and the future directions these technologies are likely to take.What you will learn• Understand the fundamentals of transistor technology and digital circuits• Explore the concepts underlying pipelining and superscalar processing• Implement a complete RISC-V processor in a low-cost FPGA• Understand the technology used to implement virtual machines• Learn about security-critical computing applications like financial transaction processing• Get up to speed with blockchain and the hardware architectures used in bitcoin mining• Explore the capabilities of self-navigating vehicle computing architectures• Write a quantum computing program and run it on a real quantum computerWho this book is forThis book is for software developers, computer engineering students, system designers, reverse engineers, and anyone looking to understand the architecture and design principles underlying modern computer systems: ranging from tiny, embedded devices to warehouse-size cloud server farms. A general understanding of computer processors is helpful but not required.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Modern Computer Architecture and Organization als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Modern Computer Architecture and Organization von Jim Ledin, Dave Farley im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Informatica & Hardware. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Jahr
2022
ISBN
9781803238234
Auflage
2

Appendix

Answers to Exercises

Chapter 1: Introducing Computer Architecture

Exercise 1

Using your favorite programming language, develop a simulation of a single-digit decimal adder that operates in the same manner as in Babbage’s Analytical Engine. First, prompt the user for two digits in the range 0-9: the addend and the accumulator. Display the addend, the accumulator, and the carry, which is initially zero. Perform a series of cycles as follows:
  1. If the addend is zero, display the values of the addend, accumulator, and carry and terminate the program
  2. Decrement the addend by one and increment the accumulator by one
  3. If the accumulator incremented from nine to zero, increment the carry
  4. Go back to step 1
Test your code with these sums: 0+0, 0+1, 1+0, 1+2, 5+5, 9+1, and 9+9.

Answer

The Ex__1_single_digit_adder.py Python file contains the adder code:
#!/usr/bin/env python """Ex__1_single_digit_adder.py: Answer to Ch 1 Ex 1.""" import sys # Perform one step of the Analytical Engine addition # operation. a and b are the digits being added, c is the # carry def increment_adder(a, b, c): a = a - 1 # Decrement addend b = (b + 1) % 10 # Increment accum, wrap to 0 if necessary if b == 0: # If accumulator is 0, increment carry c = c + 1 return a, b, c # Add two decimal digits passed on the command line. # The sum is returned as digit2 and the carry is 0 or 1. def add_digits(digit1, digit2): carry = 0 while digit1 > 0: [digit1, digit2, carry] = increment_adder( digit1, digit2, carry) return digit2, carry 
The Ex__1_test_single_digit_adder.py file contains the test code:
#!/usr/bin/env python """Ex__1_test_single_digit_adder.py: Tests for answer to  chapter 1 exercise 1.""" import unittest import Ex__1_single_digit_adder class TestSingleDigitAdder(unittest.TestCase): def test_1(self): self.assertEqual(Ex__1_single_digit_adder.add_digits( 0, 0), (0, 0)) def test_2(self): self.assertEqual(Ex__1_single_digit_adder.add_digits( 0, 1), (1, 0)) def test_3(self): self.assertEqual(Ex__1_single_digit_adder.add_digits( 1, 0), (1, 0)) def test_4(self): self.assertEqual(Ex__1_single_digit_adder.add_digits( 1, 2), (3, 0)) def test_5(self): self.assertEqual(Ex__1_single_digit_adder.add_digits( 5, 5), (0, 1)) def test_6(self): self.assertEqual(Ex__1_single_digit_adder.add_digits( 9, 1), (0, 1)) def test_7(self): self.assertEqual(Ex__1_single_digit_adder.add_digits( 9, 9), (8, 1)) if __name__ == '__main__': unittest.main() 
To execute the tests, assuming Python is installed and is in your path, execute the following command:
python Ex__1_test_single_digit_adder.py This is the output of a test run: C:\>python Ex__1_test_single_digit_adder.py ....... ---------------------------------------------------------------------- Ran 7 tests in 0.001s OK 

Exercise 2

Create arrays of 40 decimal digits each for the addend, accumulator, and carry. Prompt the user for two decimal integers of up to 40 digits each. Perform the addition digit by digit using the cycles described in Exercise 1, and collect the carry output from each digit position in the carry array. After the cycles are complete, insert carries and, where necessary, ripple them across digits to complete the addition operation. Display the results after each cycle and at the end. Test with the same sums as in Exercise 1 and test 99+1, 999999+1, 49+50, and 50+50.

Answer

The Ex__2_40_digit_adder.py Python file contains the adder code:
#!/usr/bin/env python """Ex__2_40_digit_adder.py: Answer to Ch 1 Ex 2.""" import sys import Ex__1_single_digit_adder # Add two decimal numbers of up to 40 digits and return the # sum. Input and output numeric values are represented as # strings. def add_40_digits(str1, str2): max_digits = 40 # Convert str1 into a 40 decimal digit value num1 = [0]*max_digits for i, c in enumerate(reversed(str1)): num1[i] = int(c) - int('0') # Convert str2 into a 40 decimal digit value num2 = [0]*max_digits for i, c in enumerate(reversed(str2)): num2[i] = int(c) - int('0') # Sum the digits at each position and record the # carry for each position sum = [0]*max_digits carry = [0]*max_digits for i in range(max_digits): (sum[i], carry[i]) = Ex__1_single_digit_adder. \ add_digits(num1[i], num2[i]) # Ripple the carry values across the digits for i in range(max_digits-1): if (carry[i] == 1): sum[i+1] = (sum[i+1] + 1) % 10 if (sum[i+1] == 0): carry[i+1] = 1 # Convert the result into a string with leading zeros # removed sum.reverse() sum_str = "".join(map(str, sum)) sum_str = sum_str.lstrip('0') or '0' return sum_str 
The Ex__2_test_40_digit_adder.py file contains the test code:
#!/usr/bin/env python """Ex__2_test_40_digit_adder.py: Tests for answer to  chapter 1 exercise 2.""" import unittest import Ex__2_40_digit_adder class Test40DigitAdder(unittest.TestCase): def test_1(self): self.ass...

Inhaltsverzeichnis