-
Notifications
You must be signed in to change notification settings - Fork 0
CS101
Euccas Chen edited this page Nov 29, 2017
·
7 revisions
字节(Byte):通常将可表示常用英文字符8位二进制称为一字节。
一个英文字母(不分大小写)占一个字节的空间,一个中文汉字占两个字节的空间.
符号:英文标点2占一个字节,中文标点占两个字节.
-
one char (a-zA-Z .,!+ 0123456789) = 1 byte
-
one Chinese char (including symbols) = 2 bytes
-
one integer:
- on 16 bit machine = 16 bits (2 bytes)
- on 32 bit machine = 32 bits (4 bytes)
- on 64 bit machine = 64 bits (8 bytes)
-
一个16进制的数
- 等于4位二进制的数 (4 bits),比如b = 1011, 一个字节是8bits (比如01010001)
- 所以一个16进制的数是0.5 bytes
- 2个16进制的数是1 byte
Write Through vs. Write Back
- Write Through: write to cache and write to the main memory at the same time
- Write Back: only write to main memory when the cache memory to be updated is removed from cache
Types of codes:
- parity codes
- linear codes: Hamming codes
- cyclic codes: CRC codes, Reed-Solomon codes
- unordered codes: m-of-n codes, Berger codes
- arithmetic codes: AN-codes, residue codes
- Add an extra bit to binary word so that the resulting code word has either even or odd number of 1s ** even parity: even # '1' ** odd parity: odd # '1'
- single bit error detection: Cd = 2
- separable code
- use: bus, memory, transmission ...
- Overlapping parity for 4-bits of data - each data bit is assigned to multiple parity groups
- k data bits, c parity bits
- to have unique parity pattern per error:
2^c >= k+c+1