Modern Computer Architecture and Organization
eBook - ePub

Modern Computer Architecture and Organization

Jim Ledin, Dave Farley

Partager le livre
  1. 666 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

Modern Computer Architecture and Organization

Jim Ledin, Dave Farley

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

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.

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Modern Computer Architecture and Organization est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Modern Computer Architecture and Organization par Jim Ledin, Dave Farley en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Informatica et Hardware. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
2022
ISBN
9781803238234
Édition
2
Sous-sujet
Hardware

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...

Table des matiĂšres