GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Karteikarten

Week1

Isaac Gilbert Computer Science Englisch 43 Karten

Karten in diesem Stapel (43)

  1. 1Computer hardwareA processor contains around 10^7
    (ten million) electronic components
  2. 2System softwareA modern operating system contains ~107
    lines of code (C and C++)
  3. 3Levels of abstractionApplications
    Algorithms, Program. Languages
    System Software (OS, compilers)
    ISA (HW-SW interface)
    Microarchitecture
    Digital Circuits
    Electrons
  4. 4SoftwareApplications
    Algorithms, Program. Languages
    System Software (OS, compilers)
  5. 5HardwareMicroarchitecture
    Digital Circuits
    Electrons
  6. 6Computer ArchitectureISA (HW-SW interface)
    Microarchitecture
    Digital Circuits
  7. 7Types of computer systemsServers
    Personal computers
    Mobile devices
    Embedded devices
  8. 8Embedded devices– Task-specific: sensing, control, media playback, etc
    – Low-cost, low-power
    – Single program
  9. 9Mobile devices– Smartphones, tablets
    – Highly integrated (multiple processors, GPU, GPS,
    media accelerators, etc), low-power
    – Single-user, multi-program
  10. 10Personal computers– Laptops, desktops
    – Balance cost and processing power
    – Few users, multi-program
  11. 11Servers– Used for either a few large tasks (e.g. engineering apps),
    or many small tasks (e.g. web server, Google)
    – Fast processors, lots of memory
    – Multi-user, multi-program
  12. 12Compilersoftware that translates a high-level program into assembly (machine) language
  13. 13Operating Systemsoftware that provides lots of facilities needed by applications, which are too complicated to provide directly in the hardware
    – Files, Protection, Processes, Threads, Virtual memory, Communication, Etc
  14. 14Instruction Set Architecture (ISA)• Defines the machine language (executed directly by the computer hardware)
    – Commercial examples: RISC-V, MIPS, arm, Intel x86, etc
    – In this course: Sigma16
    • The interface between low-level circuits and high-level software
    • Simple enough that it's possible to design a digital circuit that executes machine language
    • Powerful enough that high-level languages can be translated into it
  15. 15Digital circuitsThis subject consists of
    – The basic “building block” components
    – The way they behave when connected together
    – How to combine components in order to make a circuit that does something useful
    • Surprisingly
    – There are only a few types of components
    – They are very simple
    – Yet when connected the right way, they give extraordinary behaviour
  16. 16Analogue representationThe physical measure is an “analogy” or “analogue” to the measures in your
    problem
    An electronic analogue computer solving a differential equation (say, the heat equation) would make the voltage in the computer proportional to the heat in the object
  17. 17Advantages AnalogueCan be extremely fast
  18. 18Disadvantages Analogue– Limited precision
    – After lots of calculations, errors will accumulate
    – It's hard to represent data other than real numbers (e.g. strings)
    – Large numbers can be impossible
  19. 19Digital• Count on your fingers
    • This is digital computing
    • The word digit means finger
  20. 20Advantages of digital representation• You can get as much precision as you want
    • Errors don't accumulate after lots of calculations
    • All datatypes can be represented
    • Large numbers just require also more digits
  21. 21Binary Digits: Bits• Voltage is used to represent information in digital circuits
    • We call one of the standard voltages 0 and the other 1
    • This basic unit of information is a Binary Digit or Bit
    • Disadvantage: little information per bit, so must use many bits
  22. 22Digital computing with bits• Use just two voltages, it doesn't matter what they are, for example
    – TTL circuits: 0 volts and 5 volts
    – CMOS circuits: -2.5 volts and 2.5 volts
    • Circuits are simpler and more reliable if we just use two different voltages
  23. 23Flip FlopA flip flop is a basic digital circuit that can
    – Take a data bit and store it (“remember it”)
    – Remember the value indefinitely
    – Read out the stored value
    • The computer memory consists of a large number of these basic circuits
  24. 24Bytes• A byte is a string of 8 bits
    • A byte is represented in the computer by 8 copies of the basic bit storage
    circuit (flip flop)
  25. 25Information capacity of a byte• There are exactly 2^8 = 256 distinct values that can be represented in a byte
    • There are many different ways to utilise the information capacity of a byte
    • Each basic datatype (integer, character, etc) needs a representation method
  26. 26WordsA word is similar to a byte, but a larger amount of information
    Short word 16 bits 2 bytes
    Word 32 bits 4 bytes
    Long word 64 bits 8 bytes
  27. 27architecture• The term “64-bit architecture” means that the internal hardware uses
    (mostly) 64-bit words
    • Generally, a larger word size yields faster performance
  28. 28Information capacity of a word• A word containing k bits is called a k-bit word, and can represent 2k distinct
    values
  29. 29Non-negative integersbinary
  30. 30Signed integerstwo's complement
  31. 31Approximate real numbersfloating point
  32. 32What do computer hardware and programming languages allow in data representationComputer hardware and programming languages support other representations
  33. 33Binary numbersBinary representation uses a word of k bits to represent a non-negative
    integer between 0 and 2^k- 1
    Binary numbers cannot be negative
  34. 34Binary number representationColumn values are powers of 2
    2^0 = 1 weight of rightmost bit
    2^1 = 2
    2^2 = 4
    ...
    2^k weight of leftmost bit
  35. 35Converting decimal to binaryWhen we convert a decimal number x to binary, we need to
    – Know the word size k of the result
    – Check that x will fit in the word: 0 ≤ x ≤ 2^k- 1
  36. 36Binary additionYou can add two binary numbers x and y the same way as adding decimal
    numbers
    Work through each column, from right to left
    In each column, add the bit from x, the bit from y, and the carry from the
    column to the right
    This gives the sum bit s for the column, and the carry output which goes to
    the left
  37. 37Adding bitsx+y+z c s
    0+0+0 0 0
    1+0+0 0 1
    1+1+0 1 0
    1+1+1 1 1
  38. 38Two's complementTwo's complement is a method for representing integers that can be negative
    or positive
    Remember that a k-bit word can represent 2^k different values
    In two's complement, half of those values represent negative integers,
    and half represent nonnegative integers
    The range is -2^(k-1) to 2^(k-1)- 1
  39. 39Sign bitThe sign bit is the lefmost bit of a two's complement number
    – If the sign bit is 1, the number is negative (< 0)
    – If the sign bit is 0, the number is nonnegative (≥ 0)
    – If all the bits are 0, the number is 0
  40. 40Negating a two's complement number xIf the sign bit is 0, then treat it just like a binary number
    If the sign bit is 1, then negate it and treat the result like a binary number
    Two steps
    1. Invert each bit (replace 0 by 1, replace 1 by 0)
    2. Add 1
    The result is the representation of –x
    It works for every number (negative, zero, positive)
  41. 41Why Hexadecimal is usedWhen working with machine language and assembly language, we frequently need to write down the values of words
    You can break a long word of bits into groups of 4 bits, and replace each
    group by the corresponding hex digit
  42. 42Arithmetic with hexTo add two hex numbers, write them one above the other, and add by columns
    If the sum in a column is greater than 16, you add a carry of 1 to the column to
    the left
  43. 43Pronounce and righting hexProfessionals pronounce hex numbers by saying every digit, including leading zeros, and never use tens, twenty, hundreds, etc for hex
    – 23 is decimal: 2 x 101 + 3 x 100
    , pronounced “twenty three”
    – $0023 is hex: 2 x 161 + 3 x 160 = 35, pronounced “zero zero two three”

Informationen

Beschreibung
Computer Science Karteikarten am Week1, erstellt von Isaac Gilbert am 11/01/2022.
Erstellt von
Isaac Gilbert
Aufrufe
1
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck