虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

unsigned

整型的每一种都分为:无符号(unsigned)和有符号(signed)两种类型(float和double总是带符号的),在除char以外的数据类型中,默认情况下声明的整型变量都是有符号的类型;char在默认情况下总是无符号的。在除char以外的数据类型中,如果需声明无符号类型的话就需要在类型前加上unsigned。无符号版本和有符号版本的区别就是无符号类型能保存2倍于有符号类型的正整数数据,比如16位系统中一个short能存储的数据的范围为-32768~32767,而unsigned能存储的数据范围则是0~65535。由于在计算机中,整数是以补码形式存放的。根据最高位的不同,如果是1,有符号数的话就是负数;如果是无符号数,则都解释为正数。另外,unsigned若省略后一个关键字,大多数编译器都会认为是unsignedint。
  • //下面是画圆的程序

    //下面是画圆的程序, //画线、画圆、画各种曲线其实都很简单,归根到底就是x、y的二元方程嘛 //对算法感兴趣的话建议去找本《计算机图形学》看看,不是卖关子哦。实在是几句话说不清除,呵呵 // ---------------------------------------------- //字节 void circleDot(unsigned char x,unsigned char y,char xx,char yy)//内部函数,对称法画圆的8个镜像点 {//对称法画圆的8个镜像点

    标签: 程序

    上传时间: 2014-01-07

    上传用户:秦莞尔w

  • it is in image processing field. this code Read TIFF Image then it excute compute histogram and hist

    it is in image processing field. this code Read TIFF Image then it excute compute histogram and histogram equalization. after that it Write TIFFU unsigned Char.

    标签: processing histogram compute excute

    上传时间: 2016-12-24

    上传用户:cx111111

  • 帧缓冲#include <stdio.h> #include <stdlib.h> #include <string.h> #include <s

    帧缓冲#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdint.h> #include <unistd.h> #include <fcntl.h> #include <sys/ioctl.h> #include <sys/mman.h> #include <asm/page.h> #include <linux/fb.h> #define TRUE 1 #define FALSE 2 //a framebuffer device structure typedef struct fbdev{ int fb unsigned long fb_mem_offset unsigned long fb_mem struct fb_fix_screeninfo fb_fix

    标签: include lt gt stdlib

    上传时间: 2013-12-11

    上传用户:bjgaofei

  • PC与单片机双向通讯智能温控程序 #include <AT89X51.H> #include <intrins.h> #define Key_UP P1_0 #def

    PC与单片机双向通讯智能温控程序 #include <AT89X51.H> #include <intrins.h> #define Key_UP P1_0 #define Key_DOWN P1_1 #define Key_SET P1_2 #define RelayOutPort P2_0 #define LEDPort P0 #define DELPort P2_1 #define LEDTwoC P3_6 #define LEDThreeC P3_7 #define TMPort P2_7 #define INBUF_LEN 5 //数据长度 unsigned char inbuf1[INBUF_LEN]={ 0 , 0 , 0 , 0 , 0 } //发送缓冲区 unsigned char inbuf2[50] //接收缓冲区 unsigned char count3 void init_serialcomm( void ) { SCON = 0x50 //SCON: serail mode 1, 8-bit UART, enable ucvr TMOD |= 0x20 //TMOD: timer 1, mode 2, 8-bit reload PCON |= 0x80 //SMOD=1 TH1 = 0xFA //Baud:4800 fosc=11.0592MHz IE |= 0x90 //Enable Serial Interrupt TR1 = 1 // timer 1 run } //向串口发送一个字符 void send_char_com( unsigned char ch) { SBUF=ch while (TI== 0 ) TI= 0

    标签: include intrins define Key_UP

    上传时间: 2014-11-29

    上传用户:风之骄子

  • VB遥控播放器红外遥控解码 #include <regX52.h> #define c(x) (x*110592/120000) sbit Ir_Pin=P3^2 sb

    VB遥控播放器红外遥控解码 #include <regX52.h> #define c(x) (x*110592/120000) sbit Ir_Pin=P3^2 sbit beep=P2^1 //sbit RELAY=P2^0 #define INBUF_LEN 4 //数据长度 unsigned char inbuf1[INBUF_LEN]={ 0 , 0 , 0 , 0 } //发送缓冲区 unsigned char inbuf2[50] //接收缓冲区 unsigned char count3 void init_serialcomm( void ) { SCON = 0x50 //SCON: serail mode 1, 8-bit UART, enable ucvr T2CON=0x30 TH2=0x00 TL2=0x00 RCAP2H=0xFF RCAP2L=0xDC TR2=1 } //向串口发送一个字符 void send_char_com( unsigned char ch) { SBUF=ch while (TI== 0 ) TI= 0

    标签: include 110592 120000 define

    上传时间: 2013-12-21

    上传用户:yph853211

  • 液晶 OCM/TG240128 驱动 编程语言: C 原产品硬件ATMega128/1280 ,晶振14.7456M 软件AVR ICC7.14C 破解版 由产品源码中提取,详细的

    液晶 OCM/TG240128 驱动 编程语言: C 原产品硬件ATMega128/1280 ,晶振14.7456M 软件AVR ICC7.14C 破解版 由产品源码中提取,详细的字符和图行操作.实现LCD内任何位置的定位操作. void LCD_Init(void) void GMoveTo(U8 yline, U8 xcolumn) void TMoveTo(U8 y, U8 x,U8 len) void DispStartLine(U8 gt, U8 line) void LCD_ClrRam (void) void LCD_ON(unsigned char on) void Draw_Pixel(U8 x, U8 y) void LineTo(U8 x0, U8 y0, U8 x1, U8 y1) void Draw_Line(unsigned char x0, unsigned char y0, unsigned char yl) void disp_img(unsigned int x0, unsigned int y0, unsigned int xl, unsigned int yl, const U8 *img) void DispString(unsigned char x, unsigned char y, char* string) void Printf(U8 x, U8 y, char *fmt, ...) ......

    标签: 14.7456 240128 ATMega 1280

    上传时间: 2013-12-27

    上传用户:youke111

  • 这个是我调通的在2410下运行文件系统的程序. 用2410驱动sd卡来实现fat文件系统. 欢迎大家来测试. 用法很简单, 如下 FILE *fp // 文件指针

    这个是我调通的在2410下运行文件系统的程序. 用2410驱动sd卡来实现fat文件系统. 欢迎大家来测试. 用法很简单, 如下 FILE *fp // 文件指针 unsigned char temp[24]="3.wav" // 文件明需要放在数组里 while(!initialize_media()) // 初始化sd卡 { Uart_Printf("sd initializing....\n") } Uart_Printf("sd ready\n") fp=fopen(temp, READ) // 打开文件就可以用了, 函数和标准c中的一样,所以不能加载stdio.h if(!fp) { Uart_Printf("open file wrong\n") while(1) } Uart_Printf("open file successed\n")

    标签: 2410 FILE fat 文件系统

    上传时间: 2013-12-30

    上传用户:xlcky

  • sbit CS = P1^0 sbit SCK = P1^6 sbit SIN = P1^7 sbit SOUT = P1^5 sbit WP = P1^1

    sbit CS = P1^0 sbit SCK = P1^6 sbit SIN = P1^7 sbit SOUT = P1^5 sbit WP = P1^1 void XReady(void) void XSendByte(unsigned char b) unsigned char XGetByte(void) void XWriteEn(void) void XWriteDis(void) unsigned char XReadStatus(void) void XWipPoll(void) void XWriteStatus(unsigned char b) void XReadData(unsigned char *m,unsigned char x,unsigned char n) void XWriteData(unsigned char *m,unsigned char x,unsigned char n) #define XResetDog() {CS=0 CS=1 } void InitX5045(void)

    标签: sbit SOUT SCK SIN

    上传时间: 2014-01-17

    上传用户:lijinchuan

  • Open-source, free, multi-platform BASIC compiler, with syntax similar MS-QuickBASIC (including the G

    Open-source, free, multi-platform BASIC compiler, with syntax similar MS-QuickBASIC (including the GFX statements), that adds new features such as pointers, unsigned data types, inline assembly, a pre-processor and many others.

    标签: multi-platform MS-QuickBASIC Open-source including

    上传时间: 2017-05-06

    上传用户:cursor

  • 基于单片机的10根线束线缆检测器的源程序 #pragma sfr #pragma DI #pragma EI #pragma NOP //#pragma interrupt INTTM010

    基于单片机的10根线束线缆检测器的源程序 #pragma sfr #pragma DI #pragma EI #pragma NOP //#pragma interrupt INTTM010 isr_INTTM000 #pragma interrupt INTTM80 isr_INTTM80 //#pragma interrupt INTTMH1 isr_INTTMH1 #pragma section @@CNST OPT AT 80H const char OPTION=0x94 typedef unsigned char uchar typedef unsigned int uint //==PORT DEFINE== #define SEND1_P P4.1 #define SEND2_P P4.2 #define SEND3_P P4.3 #define SEND4_P P4.4 #define SEND5_P P4.5 #define SEND6_P P4.6 #define SEND7_P P4.7 #define SEND8_P P13.0 #define SEND9_P P2.3 #define SEND10_P P2.2

    标签: pragma interrupt INTTM 010

    上传时间: 2017-05-25

    上传用户:sunjet