arkarMannAung / FE-Exam

0 stars 0 forks source link

FE Old Question Note #1

Open arkarMannAung opened 1 year ago

arkarMannAung commented 1 year ago

စာဖတ်ရန်လိုနေသေး၍ အမှိုက်ပုံအရေးအခင်းကို ချန်လှပ်ပြီး စာပြန်ဖတ်လိုက်ပါအုန်းမည် Circuit Configuration of ALU [ 2018A_AM_Q1, ]

probability [ 2018A_AM_Q1 ]

Hamming

amemelwin commented 1 year ago

Chapter 1

1) Basic Configuration of Computers

2) Data Representation in Computers

2-1) Data Representation

  1. Unit of representation
    1. Data are recorded as electric signals therefore it can only represent two stage: 0 and 1.
    2. Data represented with 0 or 1 unit is called bit
    3. Byte unit is formed by collecting 8 bits
    4. Word unit is formed by collecting more bits than in a byte such as 16 bits, 32 bits, 64 bits, etc.
    5. Word is also the unit of processing inside computers so the more bits collected within a word, the faster the processing speed of the computer
  2. Information Amount
    1. The number of bit combination is referred to as Information Amount
    2. Information Amount that can be represented with 2 bits is 4 types(00, 01, 10, 11) and with 3 bits is 8 types(000,001,010,011…) basically it is 2 power n types where n is referred to as bits
  3. Prefix
    1. In data handling, it is very difficult to handle very large or very small data without modification so those data are represented by combining with prefix(auxiliary units) which are representing certain values
    2. Prefixes used for representing large numbers
      1. k → Kilo → 10^3 → 2^10
      2. M → Mega → 10^6 → 2^20
      3. G → Giga → 10^9 → 2^30
      4. T → Tera → 10^12 → 2^40
      5. P → Peta → 10^15 → 2^50
    3. Prefixes used for representing small numbers
      1. m → Milli → 10^-3
      2. M → Micro → 10^-6
      3. n → Nano → 10^-9
      4. p → Pico → 10^-12
    4. Prefixes are also represented with binary form when numbers related to computers are represented like byte. E.g. 1k byte = 1×2^10 byte = 1024 byte
    5. Note: 1×2^10 byte is similar to 1×10^3 so these days 1k byte is also know as 1000 byte

2-2) Radix and Radix Conversion

  1. Radix and Radix Conversion
    1. Decimal numbers we are using are obtained by multiplying with 10 power n
    2. (362.9)10 = 3×10^2 + 6×10^1…
    3. The weight(10) of the digital digit is called Radix and numbers representing with radix n are called n-adic numbers.
    4. n-adic numbers go through from 0 to n-1
    5. Binary Numbers
      1. Binary Numbers are represented by using only two numbers: 0 and 1
      2. Computers use binary Numbers that represent numerical values with two numbers, 0 and 1.
      3. (101.1)2 = 1×2^2 + 0×2^1 + 1×2^0 + 1×2^-1 = (5.5)10
    6. Octal Numbers
      1. Octal Numbers are numerical values that are represented by using 8 numbers from 0 through 7
      2. (317.5)8 = 3×8^2 + 1×8^1 + 7×8^0 + 5×8^-1 = (207.625)10
      3. 8 → 10 (in octal format) , 9 → 11(in octal format), 10 → 12(in octal format)
    7. Hexadecimal Numbers
      1. Hexadecimal Numbers are numerical numbers that are represented by using 16 numbers from 0 through 9, A(10), B(11), C(12), D(13), E(14), F(15)
      2. (1A6.E)16 = 1×16^2 + 1016^1 + 616^0 + 14*16^-1 = (422.875)10
    8. Relation between binary numbers, octal numbers, and hexadecimal numbers
      1. Binary numbers have an extremely large number of digits compared with decimal numbers.
      2. octal numbers and hexadecimal numbers are used so that people can understand more easily.
      3. Binary number (001 011 100 . 111 010)2 → (1 3 4 . 7 2)8 (why we are separating 3 bits as one number is because octal is 8 which is 2 power 3 (2^3) )
      4. 3 digits of binary numbers corresponds to 1 digit of octal number. 4 digits of binary numbers correspond to 1 digit of hexadecimal number.
      5. Binary number (0101 1100 . 1110 1000)2 → (5 C . E 8)16
    9. Radix conversion
      1. Radix conversion means changing the radix of a numerical value which also means converting binary number (radix 2) into octal number(radix 8) or hexadecimal number(radix 16)
      2. Radix conversion from a binary number into a decimal number
        1. (1001101.101)2 → 12^6 + 02^5 + … → (77.625)10
      3. Radix conversion from a decimal number into a binary number
        1. we performed separately for the integer part and the fractional part.
        2. Integer part is divided by 2 and arranging the remainder of calculation results in sequence from back.
        3. Fractional part is multiplied by 2 and arranging the integer part of each calculation result in sequence from the front.
        4. (77.625)10 → page 27 example (converting from decimal to binary)
        5. (67.6875)10 → page 27 example (converting from decimal to octal)
      4. Note: when the radix conversion from decimal to octal or hexadecimal is performed, it may be easier to convert decimal to binary, and then convert the result into octal or hexadecimal. → Page 28 example
    10. Fractional number that cannot be represented by the finite number of digits
      1. When the fractional part of a decimal number is converted into an n-adic number, it gets into a loop as the fractional part of calculation results does not become 0, and it may not be converted into a finite fraction. Page 28 example
      2. When the results of radix conversion become an infinite fraction (or) recurring fraction, numerical values are handled as approximate values inside the computer.

2-3) Representation Form of Data

  1. All data are represented with 0 or 1 inside computers. Representation form can be classified as follows: Page 28 → Figure 1-9
  2. Character Data
    1. Character Data is represented with combinations of 0 and 1.
    2. Computers in their early stage, 1 character was linked to a bit pattern of 8 bits (1 byte) and also bit patterns linked to characters were referred to as character codes, with six main character codes ASCII code, ISO code, JIS code, EBCDIC, Unicode, EUC.
    3. When data between computers is exchanged by using different character codes, character corruption (garbled characters) may occur where characters that are different from the original data are displayed.
    4. ASCII code
      1. ASCII code is the character defined by ANSI (American National Standards Institute) in 1962.
      2. composed of 8 bits which include code bits (7 bits) that represent an alphabetic character or a number, and a parity bit(1 bit) that detects an error.
      3. It doesn’t have any definitions concerning Japanese characters (e.g. Kanji, Katakana).
    5. ISO code
      1. is a 7-bit character code defined by the standardization agency ISO(International Organization for Standardization) on the basis of ASCII code in 1967.
      2. forms the basis of character codes used in different countries all over the world
    6. JIS(Japanese Industrial Standards) code
      1. is a character code that is deliberated by JISC (Japanese Industrial Standards Committee) on the basis of the Industrial Standardization Act for representing Japanese-specific characters based on the ISO code.
        1. JIS 7-bit codes/ JIS 8-bit codes (JIS X 0201) → can represent half-width katakana characters. Page 30 Figure 1-10
        2. JIS kanji code (JIS X 0208) → a character code for representing 1 hiragana or kanji character with 2 bytes(16 bits)
        3. Shift JIS code → is formed by expending JIS kanji code and also enables mixing of 1-byte characters and 2-byte characters without using a special switching code.
    7. EBCDIC (Extended Binary Coded Decimal Interchange Code)
      1. is an 8-bit character code developed by the IBM Corporation of the United States.
      2. originally developed by IBM for its own computers but computers’ 3rd generation(1960s) were mostly IBM computers so this code becomes industry standard
    8. Unicode
      1. is the character code that was developed by US based companies like Apple, IBM and Microsoft as a 2-byte universal uniform code for smooth exchange of computer data
      2. supports characters of several countries such as alphabets, kanji and hiragana/katakana, hangul characters and Arabic letters
      3. was standardized by ISO as an international standard and at present, UCS-2(2 bytes) and UCS-4(4 bytes) are defined
    9. EUC (Extended Unix Code)
      1. is the character code that was defined by the AT&T Corporation for internationalization support of UNIX(an OS which is a software program for controlling computers)
      2. an alphanumeric character is represented with 1 byte and a kanji or katakana character is represented with 2 bytes.
      3. Kanji characters are coded where the hexadecimal number “80” is added to JIS kanji code. Therefore, in kanji part, the value of the most significant bit is “1”, and it is possible to differentiate single byte alphanumeric characters and kanji characters
      4. Zoned decimal numbers are also classified as a code that represents character data even though it is not a character code
  3. Numeric Data
    1. there are two methods for numeric representation inside computers. First method is to represent numerical values with binary numbers which is suitable for performing calculations inside computers. Another method is where decimal numbers are adopted to facilitate understanding for humans.
    2. Decimal Notation → is a numeric representation method of easy-to-understand for humans. BCD code(Binary-Coded Decimal code) where each digit of a decimal number is converted into a 4-bit binary number is used. Page-32 Eg
      1. Zoned Decimal Number → is a format that represents 1 digit of a decimal number with 1 byte.
        1. A binary-coded decimal code is stored in the lower 4 bits of 1 byte corresponding to each digit, while zoned bits are stored in the higher 4 bits.
        2. A sign bit indicating a sign is stored in the higher 4 bits of the lowest digit.
        3. Zoned bits and sign bits differ depending on the character code used in computers.
        4. When EBCDIC is used, “1111(F)” is stored in the zoned bit while “1100(C)” is stored as a sign bit if it is positive(+) and “1101(D)” is stored as a sign bit if it is negative(-).
        5. When ASCII or JIS code is used, “0011(3)” is stored in the zoned bit
        6. the sign bit uses the same value however in the case of EBCDIC (it differs by manufacturer because there are no uniform definitions) Page 32 → example
      2. Packed decimal number → a format that represents 2 digits of a decimal number with 1 byte.
        1. Each digit of a decimal number is represented with a binary-coded decimal code and same as zoned decimal number
        2. the difference is the sign is shown with the lowest 4 bits, and when it falls short of a byte unit, 0 is inserted to make it a byte unit Page-33 → example
        3. packed decimal numbers can represent more information(digits) with fewer bytes compared to zoned decimal number.
        4. representing packed decimal numbers by using zoned decimal number is called unpacking that is why zoned decimal number are also referred to as unpacked decimal number
        5. zoned decimal number → cannot be used in calculations
        6. packed decimal number → can be used in calculations
        7. when decimal numbers from an input unit are entered or when decimal numbers are sent to an output unit, it is preferable to use zoned decimal numbers because the unit(1-digit numerical value) of input/output and the unit(1 byte) of information correspond to each other.
        8. Conversion between zoned decimal numbers and packed decimal numbers is performed inside computers. Page 33 → fig: 1-11
    3. Binary notation → representing numerical values as binary numbers
      1. easy to handle inside computers include fixed point numbers where the number of digits of integer part and fractional part are decided in advance, and floating point numbers where the position of radix point is changed according to the numerical value to be represented.
      2. Fixed point numbers
        1. numerical values are handled by fixing the radix point at a specific position.
        2. mostly used for handling integer numbers by fixing the position of the radix point in the least significant bit. Changing into binary format
        3. In fixed point numbers, there are two main methods of representing negative numbers:
          1. Signed absolute value notation → the most significant 1 bit is used as a sign bit and 0 is stored in it if the numerical value is positive, while 1 is stored in it if the numerical value is negative. page-34 example
          2. Complement notation → when a negative number is represented, the complement of the positive number is used. how to search complement -Page-35 example
        4. Subtraction can be substituted for addition → using addition and changing the number into negative number - Page-36 example. By using this method, subtraction won’t be needed anymore and multiplication can be done with iterations of addition and division is done with iterations of subtractions so four basic arithmetic operations(+,-,*,%) can be done with addition only
        5. A wide range of numerical values can be represented → page-37 example
      3. Floating point numbers
        1. the range of numerical values that can be represented with fixed point numbers is limited.
        2. when a vary large numerical value is handled, the number of bits should also be increased accordingly however, in reality, the number of bits used for recording data cannot be increased infinitely.
        3. That is why floating point numbers are used to represent extremely large numbers or extremely small numbers below radix point.
        4. page 37 example and sign, fraction, exponent
        5. Basic form of floating point numbers → (-1)sign Fraction(mantissa) Radix^Exponent
        6. Single-precision floating point number(32-bit format) and Double-precision floating point number(64-bit format)
        7. page 38 - 39 → explanation about sign, exponent and fraction
        8. page 40 - example
  4. Error
    1. refers to the difference between the actual value and the value represented inside the computer.
    2. (0.1)10 = (0.00011001100110011…)2 → the conversion result becomes a recurring fraction where 0011 is repeated an infinite number of times
    3. the only option for storing in fraction is to store after the loop is cut in the middle. If it is 8 bits, only up to (0.00011001)2 can be stored. When this binary number is converted into a decimal number, (0.09765625)10 is obtained and that isn’t original value so this is error.
    4. Rounding error
amemelwin commented 1 year ago

(3-2) Main Memory Configuration

3-2-1 Memory Devices

Memory devices are devices that configure main memory and registers.

IC-based memory devices (eg. semiconductor memory or IC memory).

[Classification of memory devices]

  1. MOS (Metal Oxide Semiconductor) type

high degree of integration and low power consumption/ low operating speed

but CMOS (Complementary MOS) that operating speed could be increased by transporting electrical charges by the use of free electrons and holes.

  1. Bipolar type

operating speed is high/ lower integration and power consumption is also large. (eg. logic IC TTL (Transistor-Transistor Logic)

(1) RAM (Random Access Memory)

RAM is IC memory where reading and writing of data can be done

(volatility) where data is cleared when the power is off.

operating speed is high/ expensive, high power consumption, low degree of integration because of complex configuration of the circuit, and storage capacity is smaller compared with DRAM.

it uses a flip-flop circuit that continues to retain the preceding status, and electrical charge that records information can be retained as long as power is supplied.

mainly used in registers or other memory devices

operating speed is slow,/ high degree of integration , large capacity memory at low cost

it uses a simple circuit where electrical charge is retained by condenser or capacitor.

electrical charge that records information is lost over time so it is necessary to rewrite (refresh) the information.

eg. SDRAM (Synchronous DRAM) or DDR SDRAM (Double Data Rate SDRAM) used in main memory, and RDRAM (Rambus DRAM) that uses Rambus technology in the external bus interface.

(2) ROM (Read Only Memory)

ROM is IC memory that can be used only for reading data.

It has a property (non-volatility) where data is not lost even when the power is off.

Users cannot write data

Used to store programs or data in factories, and the information is used only for the purpose of reference.

Users can write data

Based on the writing methods and restrictions on the number of rewritable times -

— PROM (Programmable ROM)

user can write information only once.

— UV-EPROM ( UltraViolet-Erasable PROM):

data can be rewritten after information is erased by irradiating ultraviolet rays

— EEPROM (Electrically EPROM):

data can be rewritten after all or a part of information is electrically erased./ limited life because of deterioration

Flash memory is a type of EEPROM.

data can be rewritten after data is erased in units of blocks through electrical operations

the number of rewritable times is limited. used for various applications as a portable and convenient storage medium.

3-2-2 Components of Main Memory

main memory unit is composed of three components.

• Memory unit contain memory cells (storage devices) that record data. • Read/write feature reads and writes data in the recording area (collection of memory cells). • Address selection feature interprets the specified address and selects the recording area of data.

3-2-3 Capacity Expansion of Main Memory

two methods of further expanding this capacity.