JOIN us on
WhatsApp Group Join Now
Telegram Join Join Now

हिंदी माध्यम नोट्स

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

Home science Geography

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

Categories: C Language in hindi

Bitwise Operator : Logical Operator in hindi , बिट वाइज ऑपरेटर : लॉजिकल ऑपरेटर हिंदी में c कंप्यूटर भाषा में

बिट वाइज ऑपरेटर : लॉजिकल ऑपरेटर हिंदी में c कंप्यूटर भाषा में , Bitwise Operator : Logical Operator in hindi  :-
C language का most unique feature है bit level programming |Bit level
programming
एक एसी प्रोग्रामिंग होती जिसमे किसी word के
individual bits पर operation किया जाता है |Bit
level programming
से कई कैलकुलेशन easy और
faster हो जाती है |
इसके लिए तीन प्रकार के operator होते
है :-
1. Bitwise logical operator
2. Bitwise Shift operator
3. one’s compliment operator
सभी operator
,integer
के बिट value
पर काम करते है |
Bitwise logical operator
Bitwise logical operator तीन प्रकार के होती है |
1. Bitwise And operator
2. Bitwise OR operator
3. Bitwise Not operator
ये bitwise
operator
होते है |अतः ये दो integer
value
के bits
पर कार्य करता है |ये leftsidebits से
start होते है सभी individual
bits
के आउटपुट हो store करता
है
|जैसे
दो input
है 1011
और 0001
तब नीचे दिए table मे
आउटपुट सेव है :
operand1(o1)
Operand
2 (o2)
O1&o2
O1||o2
1
0
0
1
1
0
0
1
0
0
0
1
1
1
1
0
1.Bitwise And operator
इस operator का syntax  ‘&’ है | ये ‘&’ दोनों तरह से integer
operands
से क्लोज होता है |and operation का आउटपुट ‘1’ होगा जब दोनों तरह के input ‘1’ होगा या ‘0’ होगा tab कोई भी एक input ‘0’ या दोनों ही ‘0’ होगा |
जैसे दो integer 13 और 23 है जिसका बिट value है |
13 : 00001101
23 : 00011001
इन बिट का आउटपुट होगा :-
operand
1
Operand
2
And
operation output
0
0
0
0
0
0
0
0
0
0
1
0
1
1
1
1
0
0
0
0
0
1
1
1
आउटपुट का integer ‘9’ है |
bitwise and operator का use किसी particular बिट को‘0’ और‘1’ test करने के लिए किया जाता है |जैसे नीचे दिए गये
प्रोग्राम मे
, fourth बिट ‘1’ की condition को check किया जाता है |
#include<stdio.h>
#include<conio.h>
#define T 8
void main()
{
int a;
printf(“Enter value
for checking”);
if(a&t)
{
printf(“fourth bit
of value is ‘1’.”);
}
else
{
printf(“fourth bit
of value is not ‘1’.”);
}
getch();
}
इस प्रकार से bitwise and operator के साथ even-odd के
प्रोग्राम को
use कर सकते है |
#include<stdio.h>
#include<conio.h>
void main()
{
int a;
int t=1;
printf(“Enter value
for checking”);
scanf(“%d”,&a);
while(a!=-1)
{
if(a&t)
{
printf(“Number is
odd”);
}
else
{
printf(“Number is
even “);
}
}
getch();
}
2.Bitwise OR
Operator
इस operator का syntax  ‘|’ है |ये ‘|’ दोनों तरह से integer
operands
से क्लोज होता है |OR operation का आउटपुट ‘0’ होगा जब दोनों तरह के input ‘0’ होगा |
या ‘1`’ होगा कोई भी एक input ‘1’ या दोनों
ही
‘1’ होगा |
जैसे दो integer 13 और 23 है जिसका बिट value है |
13 : 00001101
23 : 00011001
इन बिट का आउटपुट होगा :-
operand
1
Operand
2
And
operation output
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
0
1
0
0
0
1
1
1
आउटपुट का integer ’28’ है |
bitwise and operator का use किसी particular बिट को‘ ‘1’ set करने के
लिए किया जाता है
|जैसे पहले variable ‘a’ की bit value मे fourth बिट ‘1’ set होगा फिर , fourth बिट ‘1’ की condition को check किया जाता है |
#include<stdio.h>
#include<conio.h>
#define T 8
void main()
{
int a;
printf(“Enter value
for checking”);
scanf(“%d”,&a);
a=a|t;
if(a&t)
{
printf(“fourth bit
of value set 1 .”);
}
else
{
printf(“fourth bit
of value did not set 1 .”);
}
getch();
}
XOR Operation
इस operator का syntax  ‘^’ है |ये ‘^’ दोनों तरह से integer
operands
से क्लोज होता है |
XOR operation का आउटपुट ‘0’ होगा जब दोनों तरह के input ‘0’ या ‘1’ होगा |
या ‘1`’ होगा अगर कोई भी एक input ‘1’ होगा |
जैसे दो integer 13 और 23 है जिसका बिट value है |
13 : 00001101
23 : 00011001
इन बिट का आउटपुट होगा :-
operand
1
Operand
2
xor
operation output
0
0
1
0
0
1
0
0
1
0
1
0
1
1
1
1
0
0
0
0
0
1
1
1


उदहारण के लिए :
#include<conio.h>
#include<stdio.h>
void main()
{
int a,b;
printf(“Enter data “);
scnaf(“%d %d”,&a,&b);
int c;
c=a^b;
printf(“XOR of a ,b is %d”,c);
getch();
}
आउटपुट होगा :
Enter data 12 33
XOR of a ,b is 223
Sbistudy

Recent Posts

four potential in hindi 4-potential electrodynamics चतुर्विम विभव किसे कहते हैं

चतुर्विम विभव (Four-Potential) हम जानते हैं कि एक निर्देश तंत्र में विद्युत क्षेत्र इसके सापेक्ष…

2 days ago

Relativistic Electrodynamics in hindi आपेक्षिकीय विद्युतगतिकी नोट्स क्या है परिभाषा

आपेक्षिकीय विद्युतगतिकी नोट्स क्या है परिभाषा Relativistic Electrodynamics in hindi ? अध्याय : आपेक्षिकीय विद्युतगतिकी…

4 days ago

pair production in hindi formula definition युग्म उत्पादन किसे कहते हैं परिभाषा सूत्र क्या है लिखिए

युग्म उत्पादन किसे कहते हैं परिभाषा सूत्र क्या है लिखिए pair production in hindi formula…

6 days ago

THRESHOLD REACTION ENERGY in hindi देहली अभिक्रिया ऊर्जा किसे कहते हैं सूत्र क्या है परिभाषा

देहली अभिक्रिया ऊर्जा किसे कहते हैं सूत्र क्या है परिभाषा THRESHOLD REACTION ENERGY in hindi…

6 days ago

elastic collision of two particles in hindi definition formula दो कणों की अप्रत्यास्थ टक्कर क्या है

दो कणों की अप्रत्यास्थ टक्कर क्या है elastic collision of two particles in hindi definition…

6 days ago
All Rights ReservedView Non-AMP Version
X

Headline

You can control the ways in which we improve and personalize your experience. Please choose whether you wish to allow the following:

Privacy Settings
JOIN us on
WhatsApp Group Join Now
Telegram Join Join Now