[leetcode]Given a non-negative integer n representing the total number of bits in the code, print the sequence of gray code. A gray code sequence must begin with 0....
分类:
其他好文 时间:
2014-10-10 15:07:44
阅读次数:
167
The key is to use two constant space(32 bits) to store how many times 1 or 0 showed up in the bit i. If times of 1 in bit i is not the multiple of 3, then the unique value's bit i is 1. Otherwise the ...
分类:
其他好文 时间:
2014-10-09 15:29:08
阅读次数:
243
void show_bits(int n){ int i = 0; for(i=0;i(反码)->(反码+1)负数的原码:(补码-1)->最高位符号位别动其余均转反码
分类:
编程语言 时间:
2014-10-04 14:05:06
阅读次数:
311
本章将演示如何基于 Linux 命令行构建 Android 应用,在开始本章之前,希望你已经阅读之前几章内容。 本文环境为 RHEL Sandiego 32-bits,要基于 Linux CLI 构建 Android 应用,先决环境为: 1. JDK[1] 2. Android S...
分类:
移动开发 时间:
2014-09-28 10:42:41
阅读次数:
304
昨天笔试遇到一道题,让实现乘法的计算方法,设计方案并优化,后来总结位运算相关知识如下:在计算机中,数据是以1010的二进制形式存储的,1bytes = 8 bits,bit就是位,所以位运算就是对每个1010进行操作。位运算有&|~^>,分别是与或非异或左移右移。与:1与不变,0与为0;或:只有0或...
分类:
编程语言 时间:
2014-09-24 18:14:17
阅读次数:
242
压缩文件的用途与技术对大型文件使用压缩技术可以减低大型文件的容量,有的压缩程序还可以分割大型文件成为数个小型文件!目前我们使用的计算机系统都是使用 bytes 单位来计量的!不过,计算机最小的计量单位应该是 bits , 1 byte = 8 bits 。假如我们只是记忆一个数字,比如1,计算机如何...
分类:
其他好文 时间:
2014-09-24 03:44:25
阅读次数:
224
内核3.1引入一套新的API regmap,目的是提取出关于I2C SPI irq等相关注册、使能以及读写的公共部分,以提高代码的可重用性,并且使得在使用如上内核基础组件时变得更为简单易用。0 基础结构structregmap_config{intreg_bits;//寄存器地址的位数,必须配置,例...
分类:
其他好文 时间:
2014-09-22 13:49:02
阅读次数:
1003
/* * BitSets are packed into arrays of "words." Currently a word is * a long, which consists of 64 bits, requiring 6 address bits. * The ...
分类:
编程语言 时间:
2014-09-18 16:08:04
阅读次数:
254
redis_version:2.4.16 # Redis 的版本redis_git_sha1:00000000redis_git_dirty:0arch_bits:64multiplexing_api:epollgcc_version:4.1.2 #gcc版本号process_id:10629 # ...
分类:
其他好文 时间:
2014-09-15 21:08:59
阅读次数:
204
查看Mat文档时里面是这么描述Shallow Heap的:Shallowheap is the memory consumed by one object. An object needs 32 or 64 bits(depending on the OS architecture) per reference, 4 bytes per Integer, 8 bytesper Long, etc....
分类:
编程语言 时间:
2014-09-14 16:45:47
阅读次数:
204