Unary Code
来源:互联网 发布:2017大数据的发展现状 编辑:程序博客网 时间:2024/04/27 05:23
- Unary coding, sometimes called thermometer code, is an entropy encoding that represents a natural number n, with n ones followed by a zero (if natural number is understood as non-negative integer) or with n − 1 ones followed by a zero (if natural number is understood as strictly positive integer).
- For example 5 is represented as 111110 or 11110. Some representations use n or n − 1 zeros followed by a one. The ones and zeros are interchangeable without loss of generality.
- Unary coding is both a prefix-free code and a self-synchronizing code.
- A generalized version of unary coding is able to represent numbers much more efficiently than standard unary coding.
- Here’s an example of generalized unary coding for integers from 1 through 15 that requires only 7 bits (where three bits are arbitrarily chosen in place of a single one in standard unary to show the number). Note that the representation is cyclic where one uses markers to represent higher integers in higher cycles.
阅读全文
0 0
- Unary Code
- B. Unary
- B. Unary
- 14.6 Unary expressions
- 17.9.1 Unary operators
- unary operator expected
- oracle: unary operator expected
- unary operator expected解决办法
- unary operator expected解决办法
- 14.2.6.1 Unary numeric promotions
- 14.6.1 Unary plus operator
- 14.6.2 Unary minus operator
- Overloading unary operators (C++ only)
- [: -le: unary operator expected 错误
- Codeforces - 133B - Unary (水题)
- 14.2.3 Unary operator overload resolution
- perl---Named unary and File Test Operators
- " wrong type argument to unary exclamation mark"
- 项目A 引入到项目B 在maven中引入另一个项目 项目A 的方法引入到项目B
- html2canvas库使用中出现的问题及解决方案
- 【Qt】Qt程序编译成功,执行时报错:程序异常结束,crashed
- 回顾大一·C语言编程3.4(4)
- 笔记:关于Gradle error Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m的解决方案
- Unary Code
- MS SQLServer 批量附加数据库
- Arch Linux fcitx 新世纪五笔配置
- python的meshgrid的用法及灰度图像的显示
- jsp获取随机数并跳转到相应的jsp
- 我将入驻云栖社区
- 渗透测试 | 信息收集 | 1-被动信息收集
- Xcode 探讨之 LLDB的基本使用
- 一起来学SpringCloud之