1331com银河游戏

ƽ̨ûĻоѡصģ1Cʾλ罫ijֵλ 2C԰λ 3C Ƶ << >> 4cԣλ>> 5C λ λ +-*/ ȼô 6C <<λǷдƣ 7C 8C 9C йλʱ 10C λ⣬񣬰æһ£
ƽ̨û 2018-06-06 16:59:10

Ǿѡƽ̨ûʱ

ֻ֪
ֻ֪


ֻ֪ѣCʾλ罫ijֵλ

Ľѱ3567˵
λ"<<"  ">>"

ٸӣa2λȻ󸳸a
a<<=2 Ҳa=a<<2

C1λ൱ڳ2൱ڳ2
һα༭ʱ 2010-09-02
ѧǹ㶫
ѧǹ㶫


ѧǹ㶫C԰λ

C԰λ<<ô?ʱλȥ?ƶһλ?
Ľѱ7920˵

CаλƵΪ<<£

ڲa<

1 նֵÿλλ(д)ƶnλ

2 λ(ߵ)nλȥ

3 λ(ұ)n0.


char;£

һ

0x12 << 3 =>

B00010010 << 3 =>

B10010 000(λ0ȥƣλ0) =>

0x90

0x12 << 3 = 0x90

0x9E << 2 =>

B10011110 << 2 =>

B01111000 (λ10ȥ,λ0)=>

0x78


Աд³֤

#include 
void check(char a, int n)
{
    printf("0x%hhx << %d = 0x%hhx\n", a, n, a<}

int main()
{
    check(0x12, 3);
    check(0x9e, 2);
    
    return 0;
}

нΪ

0x12 << 3 = 0x90
0x9e << 2 = 0x78

ԿǼġ

һα༭ʱ Ƽ2017-09-14 12:08:43
Ū¹R
Ū¹R


Ū¹RC Ƶ << >>

һԺ󣬸ֵı仯ûУٽһƣǶԭƣڵһƵĻƶ a=ox32 (16) 0011 0010 b=a<<2 ʱb=1100 1000 Բ ôʱa= c=a<<2 cԭaijֵ... һԺ󣬸ֵı仯ûУٽһƣǶԭƣڵһƵĻƶ
a=ox32 (16) 0011 0010
b=a<<2
ʱb=1100 1000 Բ
ôʱa=


c=a<<2
cԭaijֵox32ƶ
bĻƶ

شԽϸԽã
õ ضӷ
ʱc=
b=?
a=
Ľѱ5085˵
 Ʋ޸a

a=ox32 (16) 0011 0010
b=a<<2
ʱb=1100 1000
ôʱa=0011 0010


c=a<<2
cԭaijֵox32ƶ
ʱc=1100 1000
һα༭ʱ Ƽ2017-11-24 11:58:40



⣺cԣλ>>

void main()
{
short a=0xf245,b;
b=a>>8;
printf("....".......)
}
Ϊʲôb=0xfff2,0x00f2
Ľѱ2610˵
ƶԷλĴƲͬ,з˵,int,ƻᱣַλ,:10100110 >>5(ֳΪ8λ)õ 11111101

֮,C,߼/(ȫͬ),,ᱣַλ.ʵӦпԸ/ٵij/,ѭЧʸߺܶ.

ԣshort a=0xf245a=1111001001000101,ƺb=a>>8;b=1111111111110010,b=0xfff2עзΪƣ

׷

˭ܸңΪʲôf245Ǹģֲ-f245

׷

short a=0xf245a=1111001001000101,λΪ1ǸڼԲʽڣ-f245ʽԲ鿴֪ʶ

һα༭ʱ Ƽ2017-10-06 19:08:54
binlaniua
binlaniua


binlaniuaC λ λ +-*/ ȼô

Ľѱ1031˵
Cʹõȼͽԣ 
ȼ
() () [] -> .
! ~ ++ -- + - * & sizeof
* / %
+ -
<< >>
< <= > >=
== !=
&
^
|
&&
||
?:
= += -= *= /= %= &= ^= |= <<= >>=
() ,
ָsizeof[]ȵ

һֵ
ֵǰijʽֵֵһΪ=ﲢǵڵ˼ֻǸֵá==ʾ
ע⣺ֵߵıڳطҪ
ѸֵıdzΪֵΪdzڸֵߣֵıʽdzΪֵΪdzڸֵұߡֻΪֵ

count=5;
total1=total2=0;
һֵҶ⡣
ڶֵ˼ǰ0ͬʱֵΪֵǴģҲ˵Ҷ˿ʼ㡣total2=0;Ȼtotal1=total2;ôвأ
(total1=total2)=0;
DzԵģΪҪģʱtotal1=total2һʽֵDzʽڵġ


CĿ˫Ŀ

+ Ŀ
- Ŀ
* ˷
/
% ȡģ
+ ӷ
-
һЩֵӣ ڸֵҲıʽоʹ
Area=Height*Width;
num=num1+num2/num3-num4;
Ҳи˳⣬˳ӼĿ͵Ŀ㡣
ȡģ(%)ڼõ磺
a=7%4;
aĽ3Ϊ7%43
ôҪˣҪǵôأ
b=7/4;
bǵˣӦ1
Ҳ˾Ͳˣ7/4Ӧ1.75ô1أҪ˵ǣʱõĽȻûС֡ҪҲõС֣д7.0/47/4.0ҲһΪ
ôһʵõأҪǿתˡ磺
a=(int) (7.0/4);
Ϊ7.0/4ֵΪ1.75ǰ(int)ͱʾѽǿתͣ͵õ1ô˼һa=(float) (7/4);aĽǶ٣
Ŀ൱ȡ෴ֵֵͱΪֵǸͱΪֵ
Ŀû壬Ǻ͵Ŀһõġ

߼
߼ǸݱʽֵֵǼֵʵCûνֵͼֵֻΪ0Ϊֵ0Ϊֵ

&& ߼
|| ߼
! ߼

5!3;
0||-2&&5;
!4;

ʽ&&ʱֻҪһΪ٣ܵıʽΪ٣ֻежΪʱܵʽӲΪ档ʽ||ʱֻҪһΪ棬ֵܵΪ棬ֻееĶΪʱܵʽӲΪ١߼(!)ǰӦıתΪӦ/ֵԭΪ٣߼ԺΪ棬ԭΪ棬߼ԺΪ١
һҪһ߼ʽĺһֵȡֵӰʽֵʱһ־Ͳˡ磺
a=2,b=1;
a||b-1;
Ϊa=2ΪֵԲb-1DzֵܵıʽһΪֵʱıʽͲټˡ

ġϵ
ϵǶʽбȽϣһ/ֵ

>
< С
>= ڵ
<= Сڵ
==
!=
ЩҶףҪǵ==͸ֵ=ˡ
һЩտʼѧϰCԵǶŪףһЩϳԼʱҲĴ룺
if(Amount=123)
ܶ˶ΪAmount123ôʵд˼ȸֵAmount=123ȻжʽDzֵΪΪ 123ֵôġõAmount123ʱӦif(Amount==123)

塢Լ
һ++Լ--ԱIJ1ͼ1磺
--Couter;
Couter--;
++Amount;
Amount++;

Щǰ滹ںԱӰ춼һģǼ1߼1ǵΪʽһ֣߾ˡڱǰ棬ô֮ǰԼ㣻ں棬ôԼڱμӱʽ㡣̫ܲӣ
num1=4;
num2=8;
a=++num1;
b=num2++;

a =++num1;ܵһֵ++num1ֵaΪڱǰ棬num11Ϊ5ȻֵaaҲΪ5b=num2++;ǰnum2++ֵbΪڱĺ棬Ȱnum2ֵbbӦΪ8Ȼnum21Ϊ 9
ôôأ
c=num1+++num2;
c=(num1++)+num2;c=num1+(++num2);ҪݱͬıвͬĽԺı̵УӦþ渴ӵ

ϸֵ
ڸֵУһC/C++еĸϸֵʵһдʽʹöԱĸıΪࡣ
Total=Total+3;
էһд룬ƺ⣬Dzܳġʵӣ'='Ǹֵǵڡ˼DZֵ3ȻڸֵΪ˼򻯣ĴҲдɣ
Total+=3;
ϸֵЩ

+= ӷֵ
-= ֵ
*= ˷ֵ
/= ֵ
%= ģ㸳ֵ
<<= Ƹֵ
>>= Ƹֵ
&= λ߼븳ֵ
|= λ߼ֵ
^= λ߼ֵ
ʮϸֵУǵԺλʱ˵
ôĸϸֵ˾ͻʣTotal=Total+3;Total+=3;û𣿴еģA=A+1ʽAΣڸA+=1ʽAһΡһ˵ڳûжӰ죬ǵʽΪķֵʱͱ(Ժ˵)ʹͨĸֵҲӴĿʹЧʽ͡

ߡ
(?:)CΨһһĿǶԵһʽ/ټ⣬Ȼݽʽеһ
<ʽ1>?<ʽ2>:<ʽ3>
УȶԵһʽм飬Ϊ棬򷵻رʽ2ֵΪ٣򷵻رʽ3ֵ

a=(b>0)?b:-b;
b>0ʱa=bb0ʱa=-bʽʵ˼ǰbľֵֵa

ˡ
CУʽöŷֿöŷֿıʽֱֵ㣬ʽֵһʽֵ
b=2,c=7,d=5,
a1=(++b,c--,d+3);
a2=++b,c--,d+3;
ڵһд룬ʽöŷֿյֵӦһʽֵҲd+3Ϊ8a=8ڵڶд룬ôҲʽʱʽΪa2=++bc--d+3,(Ϊֵȶȼ)ձʽֵȻҲΪ8a2=3

λ߼λȵȣǵȵλʱ˵

šȼͽ
ĶǸӿԿЩʱһ˳򣬾ͺҪ˳ӼһȼͽҪԣֳΪ˳ɱʽĸǷԼʲôʱ㡣
һα༭ʱ 2008-07-25
çײش
çײش


çײش룺C <<λǷдƣ

Ľѱ7880˵
ûƣCĴ洢long longdouble64λ<<64һ0ˡûʲô

׷

ڵƬ<<λһ¼CYֵѭͻDzơллĻشҵˡa=(a<<1)|(a>>2);ʵѭ

һα༭ʱ Ƽ2016-10-03 13:52:08
271768603
271768603


271768603C

#define RW_CIRCCTL 0xF4 #define PIECCALIGN (1 << 7) // PI Error Count Aligned ECC #define CDERRCNT_01 (0 << 6) // 1 Sector Error Cal Interval #define CDERRCNT_75 (1 << 6) // 75 Sector Error Ca... #define RW_CIRCCTL 0xF4
#define PIECCALIGN (1 << 7) // PI Error Count Aligned ECC
#define CDERRCNT_01 (0 << 6) // 1 Sector Error Cal Interval
#define CDERRCNT_75 (1 << 6) // 75 Sector Error Cal Interval
#define DVDERRCNT_01 (0 << 6) // 1 ECC Error Cal Interval
#define DVDERRCNT_42 (1 << 6) // 42 Sector Error Cal Interval
#define PI_FRMERR (0 << 5) // PI frame error number
#define PI_ERROR (1 << 5) // PI error number
#define C1C2_NOSFRMERR (0 << 5) // C1/C2 no solution frame
#define C1C2_FRMERR (1 << 5) // C1/C2 frame error number

Уôʵֵģ05λ6λʲô
˵Ҷ֪Ҫ֪ΪʲôҪд0 << 5    0 << 6    5  6 ʲô壬
Ľѱ3420˵
0<<55λ000000
0<<66λ0000000
ƺöƱʾģ
ʲôãӦÿ
#define PI_FRMERR (0 << 5)
000000PI_FRMERRijġ
һα༭ʱ Ƽ2017-09-03 07:26:14
aabaabaab001
aabaabaab001


aabaabaab001C

#include"stdio.h" void main() {char ch; ch='e'; ch<<4; printf("%c\n",ch); } нe #include"stdio.h" void main() {char ch; ch='e'; ch=ch<<4; printf("%c\n",ch); } нP <<ԽASCIIֵƣд... #include"stdio.h"

void main()
{char ch;
ch='e';
ch<<4;
printf("%c\n",ch);
}
нe
#include"stdio.h"

void main()
{char ch;
ch='e';
ch=ch<<4;
printf("%c\n",ch);
}
нP
<<ԽASCIIֵƣд<<ơλ2нҲȫ鷳ϸһ°
Ľѱ5274˵
void main()
{char ch;
ch='e';
ch<<4;//ch24λûаֵchchԭֵ䣬int a = 5; a - 1; a5԰ɣ Խe
printf("%c\n",ch);
}

void main()
{char ch;
ch='e';
ch=ch<<4;//chascll101,ת2011001014λ01010000,ת1080ǴдPascllֵԽP
printf("%c\n",ch);
}
һα༭ʱ Ƽ2017-11-22 13:48:46
dengtao250
dengtao250


dengtao250C йλʱ

CPU32λоƬ unsigned char AA=0x06 (8< CPU32λоƬ unsigned char AA=0x06 (8<
Ľѱ5012˵
32λоƬλƲĴģ
ʱƳĸλȫλȫ0νƳĸλָ32λ4ֽںᶪ
ʱƳλȫ޷λ0зλ01ȷ

˵һ㣬Ĵ8<
һα༭ʱ Ƽ2016-09-07 21:49:44
ccС
ccС


ccС𳵣C λ⣬񣬰æһ£

int aa=0x12;
pitntf("%d\n",aa<<3);
Ӧõ96Ϊʲô90Ҫ4λӦ192120
æһ¡лл
Ľѱ4210˵
aa==0x120xʾʮƣʮ12ʮ16+2==180001 0010

3λ1001 0000ʮ0x90ʮ144
4λ0001 0010 0000ʮ0x120ʮ288
ȷprintf("%d\n",aa<<3);𣿿ɣprintf("%x",aa<<3);%xʾʮ
һα༭ʱ Ƽ2018-03-31 11:30:02
网站地图

银河1331官网