码迷,mamicode.com
首页 >  
搜索关键字:bits    ( 3873个结果
位操作(C和指针)
/* **编写一个函数unsigned int reverse_bits(unsigned int value);这个函数的返回值是把value的二进制位模式从左到右变换一下后的值。 **例如在32位机器上,25这个值包含下列各位00000000000000000000000000011001   函数的返回值应该是10011000 0000 0000 0000 0000 0000 0000 ...
分类:其他好文   时间:2014-08-27 10:59:07    阅读次数:199
对linux/Android源文件目录的理解
一 linux所有的源文件均在/usr/include文件夹下面。比如我们#include 就在此目录下。而#include 就在/usr/include/i386-linux-gnu/sys/目录下#include就在/usr/include/i386-linux-gnu/bits/目录下~~二 ...
分类:移动开发   时间:2014-08-27 01:37:56    阅读次数:307
C,C++,JAVA char,各占字节数
char在C和C+中占一个字节 Java中无论是汉字还是英文字母都是用Unicode编码来表示的,一个Unicode码是16位,每字节是8位,所以一个Unicode码占两字节 /** * The number of bits used to represent a char va...
分类:编程语言   时间:2014-08-25 22:37:24    阅读次数:205
squid 学习笔记
Squid学习笔记1、安装前的配置编译安装之前需要校正的参数主要包括File Descriptor和Mbuf Clusters。1、File Descriptor查看文件描述符的限制数目:ulimit –n调整文件描述符的数目需要3步:step 1,编辑系统头文件/usr/include/bits/...
分类:其他好文   时间:2014-08-24 15:19:02    阅读次数:214
UVA - 11645 Bits
Description Problem J Bits Input: Standard Input Output: Standard Output   A bit is a binary digit, taking a logical value of either "1" or "0" (also referred to as "true" or "false" respecti...
分类:其他好文   时间:2014-08-22 22:35:36    阅读次数:278
LeetCode——Gray Code
The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total number of bits in the code, print the sequence of ...
分类:其他好文   时间:2014-08-16 12:37:20    阅读次数:219
hdu 2721(字符串处理,位运算 暴力)
Persistent Bits Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 201    Accepted Submission(s): 116 Problem Description WhatNext Softw...
分类:其他好文   时间:2014-08-14 20:48:21    阅读次数:234
将n进制的数组压缩成字符串(0-9 a-z)同时解压
此类题目要明确两点: 1. 打表:用数组下标索引字符,同时注意如果从字符对应回数字:  int index = (str[i] >= '0' && str[i] 2. 注意低位在前还是高位在前,如果先来的是 低位*radix^i 即可。 3. 统计每几个radix进制数组成一位,利用bits来表示。。。 这破题主要是麻烦。。。 #include #includ...
分类:其他好文   时间:2014-08-12 00:40:33    阅读次数:184
Character code and keyboards under windows
Character code and keyboards under windowsCharacter setBasically, windows uses the ANSI character set and not the 8-bits ASCII char set. The ANSI cha....
分类:Windows程序   时间:2014-08-11 02:45:11    阅读次数:419
不用加减乘除做加法
问题描写叙述写一个函数,求两个整数之和,要求在函数体内不得使用+、-、*、/四则运算符号。算法描写叙述从二进制运算入手,1.a^b求出各bit的和,2.a&b求出须要进位的bits,3<<1(左移位)再与a^b求和,4.反复1、2、3直至a&b==0(即进位为0),得到结果。代码int addThr...
分类:其他好文   时间:2014-08-09 15:33:38    阅读次数:188
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!