Lecture 35 Bit Fields in C Language

  Рет қаралды 104,775

MySirG.com

MySirG.com

Күн бұрын

Пікірлер: 139
@softmedun6794
@softmedun6794 Жыл бұрын
👉Sir aap bahut acha padhate hai aisa mere college ke teacher v nhi padhate sir m aapka pura video dekhta hu jo ki mujhe bahut kuchh sikhno ko milta hai Tnk u so much sir 🙏🙏🙏
@maheshnandade4334
@maheshnandade4334 7 жыл бұрын
EK BAAT AAPNE SAABIT KARDEE ,KI LECTURES AGAR SAMAJH MEIN AAYE TOH WOH KITNE DILCHASP HOTE HAIN👏👏👏👏👌👍
@ameydhimte_c5956
@ameydhimte_c5956 2 жыл бұрын
At the time this video was released vs code didn't even exist... This fact just makes me think that even today this video is being useful to people...so thankful to u sir
@fantasyteacher
@fantasyteacher Жыл бұрын
Vs Code was released on November 18, 2015
@yogarishi649
@yogarishi649 8 жыл бұрын
sir , we luv u ... the most ,the most ...and ........The mostest of the most.(for ur job## hatsoff sir ). always keep uploading videos of all your skills that are necessary for us and for ur hardwork ,we promise to not let it go vain .(one more thing ) --- may u achive immortality.......
@aniketsharma1465
@aniketsharma1465 6 жыл бұрын
UpsteamColors
@devanshgoel3433
@devanshgoel3433 2 жыл бұрын
Sir, you are real legend of computer science.
@mr.hacker....6266
@mr.hacker....6266 Жыл бұрын
Thanku SO MUCH,Sir....🤗 You Provide QUALITY EDUCATION for STUDENTS...👌👍👩‍💻
@nancygautam1312
@nancygautam1312 3 жыл бұрын
Sir apka samjhane ka tareeka i really apricots ur work if every educating system for teachers like you in no time India represent on a different level
@abhishekdash6678
@abhishekdash6678 8 жыл бұрын
sir, i have a doubt.. even in c language we can deal with divide by zero error by using goto() , where the control will move to the lebel back for taking input if the denominator is zero. so can we call it exception handling ?
@abhishekm1903
@abhishekm1903 3 жыл бұрын
Excellent work
@dineshjoshi6936
@dineshjoshi6936 7 жыл бұрын
hi sir. I couldn't understand using of unsigned with int.
@sagarbhatt9244
@sagarbhatt9244 5 жыл бұрын
Unsigned means it doesn't contain negative value
@lonewolfmohit
@lonewolfmohit 3 жыл бұрын
@@sagarbhatt9244 thank you bro!🤗
@AnjaliSharma-lk1gn
@AnjaliSharma-lk1gn 4 жыл бұрын
Nd ur lectures are helping us in 2020 alsoo...a bigg thnk-you sirr!!!!!....
@dmohan9878
@dmohan9878 3 жыл бұрын
Can you be my friend?
@believeinpractical3930
@believeinpractical3930 3 жыл бұрын
Awesome
@RahulKumar-wu1cm
@RahulKumar-wu1cm 4 жыл бұрын
Awesome lecture way of instructing is very goo5
@motivatedindia-thelion2816
@motivatedindia-thelion2816 4 жыл бұрын
Excellent sirG
@vijayrathore8401
@vijayrathore8401 8 жыл бұрын
sir in Turbo c compiler... struct Date {int d:2; int m:3; int y; }; void main () {struct Date d1={1,1,2016}; printf("%d",sizeof(d1)); getch(); } output iska 2 ke multiple aana chahiye but sir iska output 3 kyo aa raha hai??????
@hamdanali631
@hamdanali631 6 жыл бұрын
mere hisab se toh 4 bytes aana chahiye 3 toh ni yaar
@mr.knight8967
@mr.knight8967 3 жыл бұрын
May be your compiler take 1 bytes for int
@karthikk9422
@karthikk9422 8 жыл бұрын
Aap great hi
@billi5047
@billi5047 4 жыл бұрын
Sir, user enter a number how can identify the bits are required in program
@dhrumilsinhrajput99
@dhrumilsinhrajput99 8 жыл бұрын
cool videos always
@saurabhpola865
@saurabhpola865 3 жыл бұрын
Definitely a worth 👍
@dhananjayverma9826
@dhananjayverma9826 8 жыл бұрын
thanks a lot sir!
@nsumanth18
@nsumanth18 6 жыл бұрын
Awesome explanation....I love u
@pawandev1876
@pawandev1876 3 жыл бұрын
❤️❤️
@anilsharma-cd2hq
@anilsharma-cd2hq 6 жыл бұрын
Sir kya hum bit field ka use only structure m hi kar sakte h. local variable m nhi?
@EveryType883
@EveryType883 Жыл бұрын
Thank you very much sir..
@stark_n
@stark_n 5 жыл бұрын
Sir I made a program yesterday by using struct and there are char,int data type .But when I set the bit field I had to set max value of bit plus one.i.e when the bit field was 5 for int 30; but Ihad to use 6..why sir?plz give an answer
@shubhamdubey7598
@shubhamdubey7598 7 жыл бұрын
error in taking value from user its says i am giving address of bit fields,,so,cant we give address of bit fields? pls explain.
@AlokGuptakumar
@AlokGuptakumar 6 жыл бұрын
very good
@diamondstar939
@diamondstar939 4 жыл бұрын
I like it
@dhruvvbatra9235
@dhruvvbatra9235 4 жыл бұрын
in your example when you assinged bits to d and m the whole of it will be readed in only 1 cycle or 2 cycle
@nsumanth18
@nsumanth18 6 жыл бұрын
So are very good
@devashishranjan8596
@devashishranjan8596 7 жыл бұрын
thanku sir...nice explanation
@jainayush650
@jainayush650 5 жыл бұрын
Great Explaination :)
@kajalgupta2160
@kajalgupta2160 5 жыл бұрын
Nice explanation
@shayankhan4249
@shayankhan4249 3 жыл бұрын
Nice
@Aditya-dv5wg
@Aditya-dv5wg 4 жыл бұрын
Thanks sir for this vedio 🙏
@codeWithMe199
@codeWithMe199 4 жыл бұрын
love from Bangladesh
@surajjadhav2829
@surajjadhav2829 4 жыл бұрын
thank you
@anuragvikasmishra7799
@anuragvikasmishra7799 8 жыл бұрын
Hi, I am following this series of videos from the beginning, and I definitely like them. I am not sure that what is this unsigned type. could you please explain that what is the use of this keyword 'unsigned' , and how it will affect the program if I do not use this.
@anuragvikasmishra7799
@anuragvikasmishra7799 8 жыл бұрын
I am still unable to understand the concept. why it is necessary to use that , and what will happen if I do not write this keyword. Can you suggest any video where you have explained about it. If yes, that would be a great help in understanding this concept.
@KerzDude
@KerzDude 8 жыл бұрын
in a signed integer, the left most bit is reserved for the sign. 0 = positive, 1 = negative. So lets say we have a signed integer that is 3 bits. 000 = 0 001 = 1 010 = 2 011 = 3 100 = -4 (due to two's compliment) 101 = -3 (due to two's compliment) 110 = -2 (due to two's compliment) 111 = -1 (due to two's compliment) so the range of a 3 bit signed integer is from -4 to 3. in an unsigned integer, the left most bit is used for the actual number. 000 = 0 001 = 1 010 = 2 011 = 3 100 = 4 101 = 5 110 = 6 111 = 7 so the range of a 3 bit unsigned integer is from 0 to 7. Use signed integers if you want to have negative values, otherwise use unsigned. If you're wondering what two's compliment is, it's how the computer represents signed integers. Say you have a signed integer represented in binary like : 1001. Since the leftmost 1 means negative, to determine what number this value is a negative of, the computer flips all of the bits: 1001 -> 0110, and then adds 1: 0110 -> 0111, which is 7. So 1001 is actually -7 in a 4 bit signed integer. Hope that helps.
@gauravbaviskar4778
@gauravbaviskar4778 7 жыл бұрын
Michael Kerzman Thanks
@kuldeepsharma7499
@kuldeepsharma7499 4 жыл бұрын
Sir suppose d 17 bits consume krra h or m 16 bits so 3rd chunk bhi use hoga right so d,m,y ka size 12bytes hoga rightes? But kya code optimise hoga? Ya jo memory Bina bit field use hori h vhi hogi? Kya unused bits 0 hojegi ya koi or variable use kr Sakti h?
@saddamhusain-ls5qr
@saddamhusain-ls5qr 6 жыл бұрын
thanks to you sir
@priyankaranawat604
@priyankaranawat604 5 жыл бұрын
Does clear all doubts without fail. Really liked it .I look forward for more such useful content videos.
@dmohan9878
@dmohan9878 3 жыл бұрын
Can you be my friend?
@abcd76820
@abcd76820 5 жыл бұрын
unsigned kis liye likh rhe hai? structure k andr
@vsh155
@vsh155 5 жыл бұрын
😋😋😋👌🤘👌🤘
@anshikabansal5642
@anshikabansal5642 3 жыл бұрын
Sir.. Is it not possible to take the values of bit field by the user using scanf().. It shows me error.
@dmohan9878
@dmohan9878 3 жыл бұрын
Can you be my friend?
@sambhavsharma9661
@sambhavsharma9661 8 жыл бұрын
Sir, int ki hi value kiu different hoti ha different OS while others(float, char,double) contain same value. why? its urgent Sir.
@shubhpandey5228
@shubhpandey5228 7 жыл бұрын
Sambhav Sharma no brother ... sabhi ki value different hoti ... sizeof ka use krke tum value print ..krke dkh skte ho kitni memory le rhi
@mohdtauheedkhan7035
@mohdtauheedkhan7035 6 жыл бұрын
sir what we can use bit field without using unsigned keyword ????
@shubhameditz1826
@shubhameditz1826 6 жыл бұрын
sir, can you make a video on structure padding also.
@besttimeofthisplanet4234
@besttimeofthisplanet4234 6 жыл бұрын
Thanks
@pravinbadgujar7228
@pravinbadgujar7228 6 жыл бұрын
Why we are used unsigned int not only int? What happen when we will use only int?
@abhinavojha1204
@abhinavojha1204 7 жыл бұрын
sir can you tell me how does bit field can be applied on a float data-type?
@shubhpandey5228
@shubhpandey5228 7 жыл бұрын
Abhinav Ojha same way bro ..
@shankaranand9129
@shankaranand9129 3 жыл бұрын
Structure padding concept is applied
@crazymind6488
@crazymind6488 4 жыл бұрын
if data type is different then bit field is work or not?
@farzanalam1587
@farzanalam1587 4 жыл бұрын
Sir 4-4 bytes krke to mil hi rha h hume..to faeda kahan hua?? Use ni kr rhe h hm poora 4 bytes but mili to hui h na hume..to wastage ni hui?
@gautamsingh9175
@gautamsingh9175 6 жыл бұрын
It means the rest bit unused and its the drawback of bitfield.
@dharmendrahc1985
@dharmendrahc1985 5 жыл бұрын
If we learned C, can we make an application, like using .Net, JAVA sir.
@mdirshadalam2617
@mdirshadalam2617 5 жыл бұрын
Sir, how will locate 16 bytes in bit field in c++?
@salonirathi1158
@salonirathi1158 6 жыл бұрын
Nice video:))
@dmohan9878
@dmohan9878 3 жыл бұрын
Can you be my friend!?
@RakeshSingh-fy6us
@RakeshSingh-fy6us 3 жыл бұрын
Sir please explain the topic structure padding
@ushniksarkar6123
@ushniksarkar6123 6 жыл бұрын
Sir what if mixed type variables are used in the structure, like int char float ? So how the allotment in multiples of 4bytes changes or it remains the same ?
@GauravSharma-ce1yb
@GauravSharma-ce1yb 3 жыл бұрын
I also want ask the same question If you got answer then tell me also..?
@arpitpundir5309
@arpitpundir5309 5 жыл бұрын
V.gud sir
@kartikwadhawan7448
@kartikwadhawan7448 5 жыл бұрын
Why did we write unsigned before the int
@deepakbhatt1099
@deepakbhatt1099 5 жыл бұрын
How to use the left space(bits) ?
@pahadikudi3415
@pahadikudi3415 6 жыл бұрын
Sr u said that if we need 33 bits for dates and moths then 8 bytes will be allocated...Then plzz tell me fr year 4 bytes will be allocated r 8 bytes
@dmohan9878
@dmohan9878 3 жыл бұрын
Can you be my friend?
@aadi8399
@aadi8399 4 жыл бұрын
Sir every value is stored in memory as it's ASCII equivalent So how does this bit field works
@awaizkhan1333
@awaizkhan1333 4 жыл бұрын
Bro ASCII codes are used to represent character constants which consume 8 bit or one byte in memory in both 16 and 32 bit compiler. And here bit fields was used to reduce the size of integer constants.
@abhaykumarmodi7365
@abhaykumarmodi7365 4 жыл бұрын
ASCII value is for our understanding, memory always allocated in bits or bytes format and Bit fields works on bits
@aadi8399
@aadi8399 4 жыл бұрын
Sir actually my dout is If we store 1 then it will stored as its ASCII equivalent that is 49 it means it takes 6 bits to store
@ravidesai650
@ravidesai650 8 жыл бұрын
sir or videos kab aayege ???
@statusguru5251
@statusguru5251 6 жыл бұрын
Can we use short int
@akashddeepchitransh4537
@akashddeepchitransh4537 4 жыл бұрын
Sir what is that unsigned keyword
@harpuneetkalsi5960
@harpuneetkalsi5960 4 жыл бұрын
hi sir , can bit fields only be used with unsigned??
@bmanichander8446
@bmanichander8446 3 жыл бұрын
No it can be used with other datatypes also
@abhishekmaurya1170
@abhishekmaurya1170 5 жыл бұрын
मुझे ये नहीं समझ आया कि हमने getch function ya fclose use nhi kiya to output kasa dikh RHA h isme
@yogeshrawat1204
@yogeshrawat1204 5 жыл бұрын
Bhai fclose sirf tb use hota hai jb hum file ke saath kaam kr rhe hote hai... Yha hun simple sa ek concept dekha rhe hai✌
@akashpant8209
@akashpant8209 4 жыл бұрын
Babu codeblocks m getch() ki requirement ni hoti Turbo C par hoti h.
@VinodPatel-tn1hf
@VinodPatel-tn1hf 7 жыл бұрын
sir g which os should i use for coding ?
@ketangulhane1631
@ketangulhane1631 5 жыл бұрын
Sir structure padding pe video banayi ye.
@PP-hs5sg
@PP-hs5sg 6 жыл бұрын
what if we use 64 bit software
@saiyadimran8429
@saiyadimran8429 7 жыл бұрын
hi sir how to reduce whole creatred in after field
@creative_tush9508
@creative_tush9508 6 жыл бұрын
Sir what is Padding in C?
@aniketsharma6221
@aniketsharma6221 6 жыл бұрын
Sir Bit field not working in ubuntu plz help........
@besuccessful1226
@besuccessful1226 6 жыл бұрын
sir unsigned kis liye use krte h
@shaguftajamal2992
@shaguftajamal2992 6 жыл бұрын
sir how can i bought python video reply me ASAP
@bhawika902
@bhawika902 6 жыл бұрын
cant we declare date 22 /1/16 in beginning only why have u declared it two times
@dmohan9878
@dmohan9878 3 жыл бұрын
Can you be my friend?
@user-882hhgys
@user-882hhgys 7 жыл бұрын
main{ int a; printf("%d",a); } output me 2 kyu aa RHA h garbage value h kya
@anilsharma-cd2hq
@anilsharma-cd2hq 6 жыл бұрын
bhai turbo compiler m Int block 2 byte ka hi hota h
@ritikadhangar2979
@ritikadhangar2979 4 жыл бұрын
Ye garbage value h
@aparnasamantaray4935
@aparnasamantaray4935 5 жыл бұрын
Why it uses 8 bytes of memory where 41bits
@anjuagarwal2040
@anjuagarwal2040 6 жыл бұрын
Sir please make atleast one more video of this lecture on bit fields
@dmohan9878
@dmohan9878 3 жыл бұрын
Can you be my friend?
@sohitkumar7215
@sohitkumar7215 4 жыл бұрын
sir i am sohit or hamko bit fields me problam ho raha he plese help me sir
@balajicharan2481
@balajicharan2481 8 жыл бұрын
how to implement bitwise operator for addition (any arithmetic operators) in c
@shubhpandey5228
@shubhpandey5228 7 жыл бұрын
Balaji Charan.. bitwise operators ka ek alg se chapter h ..isi channel pe.. use dkho ..
@GauravSharma-ce1yb
@GauravSharma-ce1yb 3 жыл бұрын
Sir hme 4-4 bytes ke multiple mein hi ku memory blocks milenge
@bmanichander8446
@bmanichander8446 3 жыл бұрын
No it isn't like that as sir used unsigned int and it is a 32 bit compiler so 4-bytes ke multiple me ayega if u use float in 32-bit 8-bytes ke multiple me ayega Simply... sizeof(datatype) ke multiple
@samadakbarzai8135
@samadakbarzai8135 5 жыл бұрын
please tell me sir a way that i can tell you my problems because you dont answer comments
@fahimsanghariyat162
@fahimsanghariyat162 7 жыл бұрын
unsigned fuction use????????????
@manishraj7455
@manishraj7455 8 жыл бұрын
Sir,Kya ham bache hue bits ka use kar sakte h Kya???
@techsapmadeeasy
@techsapmadeeasy 5 жыл бұрын
no
@aamirsohail1241
@aamirsohail1241 7 жыл бұрын
Can anyone please help me out with this program? write a C function to set "n" bits in a 32-bit number "X" starting from position "p" It should be something like, int set_n_bits(int X, int n, int p)
@pramanikamitkumar
@pramanikamitkumar 7 жыл бұрын
use bitwise operator like right & left shift (>)
@jayeshpatilcj7911
@jayeshpatilcj7911 4 жыл бұрын
Sir I don't understand the signed and unsigned please make video on it
@bmanichander8446
@bmanichander8446 3 жыл бұрын
Signed means both negative and positive combined like if u take signed int then you can assign both negative integers and positive integers to that signed variable If u take unsigned int then u will have to assign only positive integers to that variable.
@jayeshpatilcj7911
@jayeshpatilcj7911 3 жыл бұрын
@@bmanichander8446 ok Thank you ☺️
@starshirts3616
@starshirts3616 4 жыл бұрын
sir aapne year explian nahi kiya
@Sahilbc-wj8qk
@Sahilbc-wj8qk 6 жыл бұрын
UNION IS ALSO A GOOD WAY I THINK
@lovemyindia8225
@lovemyindia8225 7 жыл бұрын
sir command line argument se file handling copy karna batayee c lang me
@sagarkoli2199
@sagarkoli2199 5 жыл бұрын
Why here use unsigned
@amitkhandelwal6866
@amitkhandelwal6866 5 жыл бұрын
Sir bitfields samajh nhi aaya
@saurabhmaurya4244
@saurabhmaurya4244 3 жыл бұрын
22/01/2016
@saurabhsharma8014
@saurabhsharma8014 7 жыл бұрын
#include using namespace std; struct student { int roll; char name; int dob; }s; int main() { cout
@uditkaushik
@uditkaushik 7 жыл бұрын
+Saurabh sharma see,first select that data type whose size is maximum (in your case it's 'int' because char is 1 byte) . Now assign each data type memory or blocks according to the size of that data type. i.e 4 bytes for int + 4 bytes to represent char + 4 bytes to represent dob = 12 bytes. To make it more clear to you let's take another example... suppose instead of int roll, there would have been long int roll..in that case it would have maximum size i.e 8 bytes hence the assignment of bytes in that case would be 8 bytes + 8 bytes + 8 bytes = 24 bytes. I hope it would be clear to you .
@saurabhsharma8014
@saurabhsharma8014 7 жыл бұрын
thanx Bhai
@pramanikamitkumar
@pramanikamitkumar 7 жыл бұрын
int roll will take 4 bytes, char name will take 1 byte but remain 3 bytes will remain vacant, as next data will store in new memory location so it will leave 3 bytes extra.
@mlgquickscoper8122
@mlgquickscoper8122 7 жыл бұрын
aree sir fullscreen upload kiya karo ye 4:3 aspect ratio annoying hai
@VanshitShah-ji3xh
@VanshitShah-ji3xh Жыл бұрын
sir ap mjo ytube channel chalate hoooooo 😂😂😂😂
@anitakumawat8103
@anitakumawat8103 6 жыл бұрын
unsigned kyu likha h aage
@dmohan9878
@dmohan9878 3 жыл бұрын
Can you be my friend?
@shubhiaggarwal7873
@shubhiaggarwal7873 6 жыл бұрын
Can you provide notes also
Lecture 36 Command Line Arguments in C language Hindi
35:20
MySirG.com
Рет қаралды 180 М.
What is Wild Pointer in C Language Hindi
16:28
MySirG.com
Рет қаралды 97 М.
ПРЯМОЙ ЭФИР. Золотой мяч France Football 2024
4:41:06
Это было очень близко...
00:10
Аришнев
Рет қаралды 6 МЛН
龟兔赛跑:好可爱的小乌龟#short #angel #clown
01:00
Super Beauty team
Рет қаралды 97 МЛН
Elza love to eat chiken🍗⚡ #dog #pets
00:17
ElzaDog
Рет қаралды 13 МЛН
Learn Bit Fields in C Programming
8:35
BestITCourses
Рет қаралды 57 М.
Structure Padding in C
8:42
Neso Academy
Рет қаралды 244 М.
C PROGRAMMING | Part-20 | Bitfields
10:10
Engineering Drive
Рет қаралды 16 М.
Lecture 30 Writing file using fwrite function in C language Hindi
21:49
Lecture 50 const in C Language Hindi
24:01
MySirG.com
Рет қаралды 98 М.
bitfields
13:00
sankar srivatsa
Рет қаралды 8 М.
C_138 Enumeration in C | enum data type in C Language
19:34
Jenny's Lectures CS IT
Рет қаралды 90 М.
Structure Padding | C Programming Tutorial
8:10
Portfolio Courses
Рет қаралды 12 М.
C_109 Structures in C - part 1| Introduction to Structures
14:42
Jenny's Lectures CS IT
Рет қаралды 447 М.
ПРЯМОЙ ЭФИР. Золотой мяч France Football 2024
4:41:06