avatar
文章
30
标签
0
分类
4
首页
归档
标签
分类
链接
关于
ZuowangDev's Blog
首页
归档
标签
分类
链接
关于

ZuowangDev's Blog

DataStructure
发表于2024-11-02|EasyScheme
简单数据类型 booleans number characters symbols boolean, number and character is self-operation, it will callback the same data in other words. Booleans Type: #f, #t Judgment: boolean? Operation: not Scheme会把任何的非**#f##看成**#t** Numbers Type: integer, rational, real, complex Judgment: number?, complex?, real?, rational?, integer? Declaration: rank-2: #b; rank-8: #o; rank-16: #x Operation: > < >= <= = + - * / 1234567(eqv? 42 42) ; ==> #t(eqv? 42 42.0) ; ==>...
Overview
发表于2024-11-02|EasyScheme
1234(begin (display "Hello, World!") (newline))(load hello.scm) 这段代码会输出 Hello, World同样,也可以在代码中输入*”Hello, World”*,同样也会输出,不过第一种的运行的副作用是在终端显示,第二种是对字符串求值的结果。 甚至可以将scheme作为系统命令
6.05 Chapter 1 Bit
发表于2024-08-17|6.05
Boolean Bit Circuit Bit Physical Bit Quantum Bit Classical Bit There are some important rules about Bits information can be acquired by observation, experiment and measurement subjective the uncertain will up and down information can be lost through coding or itself physical information is localized on space and time Boolean Bit: FunctionCircuit Bit: Combinational logic circuitsControl Bit: Computer ProgramePhysical Bit: Dot to store Quantum BitThere are two states of a small object, jus...
6.05 Chapter 2 Code
发表于2024-08-17|6.05
Preview: [[Chapter_1 Bit]] Just use for simple things Letters: BCD, EBCDIC, ASCII, Unicode, Morse Code Integers: Binary, Gray, 2’s complement Numbers: Floating-Point Proteins: Genetic Code Telephones: NANP, International codes Hosts: Ethernet, IP Addresses, Domain names Images: TIFF, GIF, and JPEG Audio: MP3 Video: MPEG Symble space size The number of symbles that need to be encodeAs a special case, if there is only one symbol, no bits are required to specify it. If the number of symbols is...
6.05 Chapter 7 Communications
发表于2024-08-17|6.05
$\star$how fast the information can be transferred to the outputthere are model about source and channel. Source ModelAn important property of such codewords is that none can be the same as the first portion or anather loager codewords(to avoid ambiguity) Kraft Inequality克拉夫特不等式$\sum\frac {1}{2^{L_i}} \leq 1$实际上,是满足:概率和小于等于1,想达到1的最大值,需要bit保证能表达的符号空间都是useful如若用11,10,01,00表示0,1,2三个数,则会出现小于1如果用00:0,01:1,1:2,则会等于1,先展开为max length codewords,再根据code space,进行取& Source Entropy在选定下一个符号时的不确定性是下一个符号...
6.05 Chapter 3 Compression
发表于2024-08-17|6.05
Lossless or reversible compression Lossy or irreversible compression Variable_length EncodingMorse Run Length EncodingFor example: a B B B B a a B B equires to a 1 B 4 a 2 B 2It is not convenient to deliver information which does not have much repeated information Static Dictionaryunused code be set to frequently occurring sequences of symbols However, there is an inherent risk: the effect of errors is apt to be much greater.rise the account of the single codeThis technique works well for se...
6.05 Chapter 4 Errors
发表于2024-08-17|6.05
Error is inevitable, protection is necessary Extension of System ModelWe will extend message bits to know errors possible even repair the errors How do Errors Happen?communication, data storage, computation Detection & CorrectionIt is necessary to contain redundancy in message In fact, if every illegal pattern is, in a sense to be described below, closer to one legal message than any other, the decoder could substitute the closest legal message, thereby repairing the damage. Hammnig D...
6.05 Hamming Codes
发表于2024-08-17|6.05
将十进制化为二进制,任何二进制数都可以用power of 2的和表达:6 -> 110 -> 2 + 4 -> 010 + 100实际上在进行奇偶校验时,Hamming Codes作出以下分组,假设第n组判断其二进制数是否在第n位上为1,若为1,则处于第n位的校验码对其进行校验。保证其1的数量满足奇偶性,在进行接收验证时,如果某组显示其校验错误,则证明错误发生在该组,说明错误位有这个校验位n的权重,将所有算得后,得到的就是错误位
LZW Algorithm
发表于2024-08-17|6.05
(1)步骤一:开始时词典包含所有可能的根,当前前缀字符串P 和 当前字符均为空; (2)步骤二:读入新的字符C,与P合并形成字符串P+C; (3)步骤三:判断P+C是否在字典中 如果“是”: P = P + C; 返回步骤二; 如果“否”: 输出P的映射; P = P+C ; 把前缀字符串P添加到字典,建立映射; 令P = C //(现在的P仅包含一个字符C); (4)步骤四: 判断码字流中是否还有码字要译 如果“是”: 返回步骤二; 如果“否”: ...
6.05 Chapter 5 Probability
发表于2024-08-17|6.05
联合事件和条件概型 Information需要表示四个结果需要2bit,需要表示n个结果需要log(2)nbit假设一个班有32个人,30男,如果被告知选中的是男,则获得的信息是:$\log_2 32 - \log_2 30 = \log_2 (\frac{1}{P})$加权平均 Efficient Source Coding 例如:为了表示30名男,需$\log_2 30$位,
123
avatar
ZuowangDev
文章
30
标签
0
分类
4
Follow Me
公告
This is my Blog
最新文章
Hello World2025-12-22
Data Structures2025-12-22
Chapter 2: Variables and Basics Types2025-12-22
Chapter 8: The IO Library2025-12-22
Chapter 3: Strings, Vectors, and Arrays2025-12-22
分类
  • 6.058
  • C++ Primer13
  • EasyScheme7
  • The Algorithms C++1
归档
  • 十二月 2025 15
  • 十一月 2024 7
  • 八月 2024 8
网站信息
文章数目 :
30
最后更新时间 :
© 2025 By ZuowangDev
Stay hungry & Stay foolish