हिंदी माध्यम नोट्स
Class 6
Hindi social science science maths English
Class 7
Hindi social science science maths English
Class 8
Hindi social science science maths English
Class 9
Hindi social science science Maths English
Class 10
Hindi Social science science Maths English
Class 11
Hindi sociology physics physical education maths english economics geography History
chemistry business studies biology accountancy political science
Class 12
Hindi physics physical education maths english economics
chemistry business studies biology accountancy Political science History sociology
English medium Notes
Class 6
Hindi social science science maths English
Class 7
Hindi social science science maths English
Class 8
Hindi social science science maths English
Class 9
Hindi social science science Maths English
Class 10
Hindi Social science science Maths English
Class 11
Hindi physics physical education maths entrepreneurship english economics
chemistry business studies biology accountancy
Class 12
Hindi physics physical education maths entrepreneurship english economics
chemistry business studies biology accountancy
Bitwise Operator : Examples in c language in hindi , बिट वाइज ऑपरेटर के उदाहरण c भाषा में हिंदी में
इसमें condition check होती| integer के बिट और ‘1’ के बीच and operation होता |अगर आउटपुट ‘0’ है तब count की value set होती है |अन्यथा count की value मे कोई effect नहीं होता है |
#define size sizeof(int)*8 // macro define जो की size को size of integer मे convert करता है | //
{
if(((x>>i) & 1)== 0 )
{
count ++;
printf(“bit is zero”);
}
printf(“Bit is not zero /t Next bit check”);
}
Bit is not zero Next bit check
bit is zero यहा पर count=2
Bit is not zero Next bit check
bit is zero यहा पर count=3
Bit is not zero Next bit check
Total Number of Zero = 3
Number of Rotation 2
Direction left
इसमें यूजर द्वारा द्वारा तीन input लेते है (i) integer (ii) number of rotation (iii) rotation direction |अगर यूजर left direction choose करता है तब left_shift function call होता है और right choose करता है तब function right_shift call होगा |
left_shift () मे ,
अगर most significant bit ‘1’ है तब shift operation bके बाद vacant हुई space पर ‘1’ आ जायेगा |और अगर most significant bit ‘0’ पर है tab vacant space पर zero insert हो जायेगा |सबसे पहले ,बिट पैटर्न मे से,MSB को remove_bit मे सेव करा देते है |फिर shifting perform होगी |बाद मे ,shifting output का MSB के साथ OR operation पेरफोर्म होगा |
right_shift() मे ,
अगर most significant bit ‘1’ है तब shift operation bके बाद vacant हुई space पर ‘1’ आ जायेगा |और अगर most significant bit ‘0’ पर है तब vacant space पर zero insert हो जायेगा |सबसे पहले ,बिट पैटर्न मे से,MSB को remove_bit मे सेव करा देते है |फिर right shifting perform होगी |बाद मे ,shifting output का MSB के साथ OR operation पेरफोर्म होगा
void left_shift(int ,int );
void right_shift(int , int );
#define SIZE sizeof(int)*8 // macro define जो की size को size of integer मे convert करता है | //
#define BITS SIZE*8-1
char choice;
printf(“Number of Rotation :”);
scnaf(“%d”,&r);
printf(“For right shifting ,enter ‘r’ or For left shifting ,enter ‘l’ \n
Enter your choice : “);
scanf(“%c”,&choice);
switch(choice)
{
case ‘r’ : right_shift( x,r);
break;
case ‘l’ : left_shift( x,r);
break;
default : printf(“Invalid choice “);
}
getch();
void left_shift(int num ,int rotation )
{
int remove_bit;
rotation=rotation%BITS;
while (rotation –)
{
remove_bit = (num>>BITS) & 1;
num=(num<<1)| remove_bit;
}
printf(“Output =%d”,num);
}
void right_shift(int num ,int rotation )
{
int remove_bit;
rotation=rotation%BITS;
while (rotation –)
{
remove_bit = num & 1;
num=(num>>1) & (~(1<<BITS));
}
printf(“Output =%d”,num);
}
Number of Rotation : 2
For right shifting ,enter ‘r’ or For left shifting ,enter ‘l’
Enter your choice : r
Output =58
Recent Posts
नियत वेग से गतिशील बिन्दुवत आवेश का विद्युत क्षेत्र ELECTRIC FIELD OF A POINT CHARGE MOVING WITH CONSTANT VELOCITY in hindi
ELECTRIC FIELD OF A POINT CHARGE MOVING WITH CONSTANT VELOCITY in hindi नियत वेग से…
four potential in hindi 4-potential electrodynamics चतुर्विम विभव किसे कहते हैं
चतुर्विम विभव (Four-Potential) हम जानते हैं कि एक निर्देश तंत्र में विद्युत क्षेत्र इसके सापेक्ष…
Relativistic Electrodynamics in hindi आपेक्षिकीय विद्युतगतिकी नोट्स क्या है परिभाषा
आपेक्षिकीय विद्युतगतिकी नोट्स क्या है परिभाषा Relativistic Electrodynamics in hindi ? अध्याय : आपेक्षिकीय विद्युतगतिकी…
pair production in hindi formula definition युग्म उत्पादन किसे कहते हैं परिभाषा सूत्र क्या है लिखिए
युग्म उत्पादन किसे कहते हैं परिभाषा सूत्र क्या है लिखिए pair production in hindi formula…
THRESHOLD REACTION ENERGY in hindi देहली अभिक्रिया ऊर्जा किसे कहते हैं सूत्र क्या है परिभाषा
देहली अभिक्रिया ऊर्जा किसे कहते हैं सूत्र क्या है परिभाषा THRESHOLD REACTION ENERGY in hindi…
elastic collision of two particles in hindi definition formula दो कणों की अप्रत्यास्थ टक्कर क्या है
दो कणों की अप्रत्यास्थ टक्कर क्या है elastic collision of two particles in hindi definition…