C Program to Convert Decimal Number to Binary Number

  Рет қаралды 143,643

CodeWithHarry

CodeWithHarry

Күн бұрын

Пікірлер: 400
@munol2524
@munol2524 Жыл бұрын
Last semester, I made a program to convert from base 10 to base n, but I didn't know how to convert fractional numbers. I was inspired by your video title to create a program that can accept rational inputs like 32.47. I first sat down and figured out the algorithm to convert the given number's integer and fractional parts to binary on paper (using reminders and division for the integer part, and multiplication and subtraction for the fractional part). Then, I generalized it to base n and wrote the program in C.Since higher bases need more digits than 0-9, I used letters A-Z and a-z to represent higher bases. To handle negative values, the program will print "-" and then take the absolute value and proceed. Here is the program. Please feel free to read it and suggest improvements. I have tried to include extensive comments for the reader's convenience. #include #include char digit(int d1){//convert given number to it's corresponding digit if (d1 < 10) return(d1 + 48); //use digits [0 to 9] else if (d1
@darshan_the_admin
@darshan_the_admin 2 жыл бұрын
Thank you bhaiyaajaan..... Aapke har eak videos Jo Maine dekhe hai, sabse kuch sikhaa huu, aur aage bhi sikungaa
@codewithharryfanchannel559
@codewithharryfanchannel559 4 жыл бұрын
You deserve millions subscribers.
@StatusWorld-bp2pq
@StatusWorld-bp2pq 4 жыл бұрын
You are my best and favourite teacher in the world
@Aryavart..
@Aryavart.. 4 жыл бұрын
9:45 --> here ✓ is used for division. 2✓12 = 0, 2✓6 = 0, 2✓3 = 1, 2✓1 = 1 Finally 12 ----> 1100.
@kunalkapse9307
@kunalkapse9307 2 жыл бұрын
Mera bhi aarhahe
@GauravSharma-vw1ns
@GauravSharma-vw1ns 2 жыл бұрын
@@kunalkapse9307 बधाई हो 😂
@alinamalhotra9895
@alinamalhotra9895 4 жыл бұрын
Perfectly syncing with my syllabus
@CodeWithHarry
@CodeWithHarry 4 жыл бұрын
Great to hear!
@kajalgoswami9530
@kajalgoswami9530 3 жыл бұрын
Thankyou sir you teaches very well..now no confusion about this programme 😊
@harshitachaurasia1246
@harshitachaurasia1246 4 жыл бұрын
Aaj hi ye digital electronics me pdhaya gya tha😂 Everytime u match 😁👍
@baki_codes
@baki_codes 4 жыл бұрын
9:43 1100 in binary sir you are the best if you see this comment please reply and heart
@darkangle9297
@darkangle9297 3 жыл бұрын
I am bangladeshi.i think your youtube channel is the best for coding
@kingkie9536
@kingkie9536 4 жыл бұрын
500k ki advance me badai.harry sir... 1, 2 din me ho to ho jaynge pakka❤💥👏
@factodro1461
@factodro1461 4 жыл бұрын
Our family is going to 5ook Congratulations 👍👍
@pivotprogrammer5602
@pivotprogrammer5602 3 жыл бұрын
Harry bhai content >= software engineer degree (Harry bhai ka video apune ko real kame ka software engineer Bana dega)
@eldrago3140
@eldrago3140 3 жыл бұрын
The binary form of 12 will be 1100. Is it correct?
@abhi8821
@abhi8821 2 жыл бұрын
S
@kashishchaurasiya1362
@kashishchaurasiya1362 2 жыл бұрын
Yes it's i right
@medicolover9297
@medicolover9297 2 жыл бұрын
Yes
@rdxprince8745
@rdxprince8745 Жыл бұрын
Ys bro
@narendrachavhan9716
@narendrachavhan9716 Жыл бұрын
No 0100
@ronakmaniya2005
@ronakmaniya2005 3 ай бұрын
9.34 For decimal to binary 12 -> 1100
@t-w-s1307
@t-w-s1307 4 жыл бұрын
harry bhai thank you for this special trick. mene 12 ka binary sy decimal ki h. the answer is=(1100)
@ashokbhongade3645
@ashokbhongade3645 4 жыл бұрын
Thanks bhaiyaa. Mujhe is video ki bhot zarroorat thi
@viralvideoa
@viralvideoa 3 жыл бұрын
9:40 1100 thankyou bhai 😊support from rajasth
@hdgamer452
@hdgamer452 4 жыл бұрын
Please make a playlist on Java Because in my book java is there but I can't understand Please make a playlist on java Please make a playlist on java Thanking you you and your work
@technobd793
@technobd793 4 жыл бұрын
Thanks sir . And love from bangladesh
@siddheshmohite283
@siddheshmohite283 2 жыл бұрын
bohot sahi tarikese samjha ,thanks.
@suhaasgambhir2432
@suhaasgambhir2432 4 жыл бұрын
Hell yeahhh 🤩 Long asked question answered 😝
@rs2_0_225
@rs2_0_225 6 ай бұрын
Thanks a lot Harry sir iss code ko samjhane ke liye..
@asparshraj9016
@asparshraj9016 4 жыл бұрын
Bhaiya you are great and you upload informative videos...
@musicbyx
@musicbyx 11 ай бұрын
9:40 1100 12number binary 😊
@subhajitghosh3867
@subhajitghosh3867 4 жыл бұрын
I am very beginner , everything I have leaned from u. I have written the java code for this question. package project1; import java.util.Scanner; public class DecToBin { public static void main(String[] args){ int[] arr = new int [10]; Scanner input = new Scanner(System.in); System.out.println("Enter your desire Number"); int n = input.nextInt(); int reminder; int i=0; while(n!=0){ reminder = n % 2; n = n/2; arr[i] = reminder; i++; } System.out.println("The Binary is"); for(int j=i-1;j>=0;j--) { System.out.print(arr[j]); } System.out.println(); } }
@SarveshKumar-bl9in
@SarveshKumar-bl9in Жыл бұрын
confusion is clear now thanks harry
@anshitshukla7498
@anshitshukla7498 4 жыл бұрын
Harry bhy Zindabad 🙏
@sandhyabhosale6328
@sandhyabhosale6328 4 жыл бұрын
Heart dedo Harry bhai coder from Hogwarts vidhyalay Delhi
@rhythmmotwani6710
@rhythmmotwani6710 2 жыл бұрын
9:40 12 in decimal =1100 in binary
@uncodeyourself4473
@uncodeyourself4473 4 жыл бұрын
thanks harry bhai i had been searching this kind of question for long time
@krishnachaudhary5392
@krishnachaudhary5392 4 жыл бұрын
Sir i have almost complited the web development playlist.... But i have basic knolwde of php so can you please make a video on how to use php as a backend..... I felt php is easy for a beginner rather than node js...... So sirplease make a video on " Using PHP In backend....
@yashwanth8350
@yashwanth8350 2 жыл бұрын
16:45 int i=4; while(n) { rem = n%2; n=n/2 a[i]= rem i - - ; } Can we use this instead? Reply if u read this comment.
@nikhilraj1842
@nikhilraj1842 4 жыл бұрын
Harry Bhai Please give me heart btw 9:31 12/2 = 6,0 [Quotient,Reminder] 6/2 = 3,0, 3/2 = 1,1 1/2 = 0,1 Taking all reminders 0011 Now reversing it 1100
@CodeWithHarry
@CodeWithHarry 4 жыл бұрын
Correct! Lots of love ❤✌
@nikhilraj1842
@nikhilraj1842 4 жыл бұрын
@@CodeWithHarry Thank you
@walishaikh6433
@walishaikh6433 4 жыл бұрын
Aap ka hi wait tha bhai pls java ka bhi bada one video banao pls🙏🙏
@53joyghorui17
@53joyghorui17 3 жыл бұрын
harry bhai ap best ho yaar💥👏
@1022-g3x
@1022-g3x 4 жыл бұрын
9:45 - 1100 DONE IN MIND
@gargprince1702
@gargprince1702 4 жыл бұрын
First comment Bhai react ke series b bnao please
@loveshkumar8159
@loveshkumar8159 4 жыл бұрын
hello sir m pakistan se ho mene ap ki sab se pahely c++ wali video dekhi tu mujhe os video m bohat kuch sekhne ko mila ............. but i need u r help.............
@manojbhavsar3872
@manojbhavsar3872 3 жыл бұрын
9:39 12 in binary = 1100
@cristinarosales1423
@cristinarosales1423 4 жыл бұрын
Thanks for these amazing videos... Can you please make videos covering other conversions and other questions which are common in online tests for internships and jobs!!????? Waiting!!!
@codewithahmed9806
@codewithahmed9806 4 жыл бұрын
Harry Sir Request ! Please Make Advance Tkinter Course ......
@AdarshSingh-cb5yf
@AdarshSingh-cb5yf 4 жыл бұрын
Thank you sir ...... (My great sir .......) 😍😍❤️❤️❤️❤️❤️❤️❤️❤️
@aqdushumza9355
@aqdushumza9355 2 жыл бұрын
Kya baat hai haris bhai❤️
@hiphopm7069
@hiphopm7069 4 жыл бұрын
2 comment sir aap suru se coading sikhaye na PLZZ sir mai siwan se hu PLZZ sir
@sumitsaha6941
@sumitsaha6941 3 жыл бұрын
Maza a gaya harry bhai❤
@drpunihealth349
@drpunihealth349 4 жыл бұрын
Sir aapse jyada ummid thi es tarah ke program ke liye lekin aap sirf 10%hi samajh paaye ,,bahut jyada kathin bana diye h ,,plz aur esay method se samajhayiye
@prakhardhyani7111
@prakhardhyani7111 4 жыл бұрын
We can use in question a[9-i]=rem instead of a[I] and print the normal array 😁
@thankyoupwandarvindarorasi3813
@thankyoupwandarvindarorasi3813 2 жыл бұрын
9:35 Ans. is 1100
@omjogani
@omjogani 4 жыл бұрын
9:44 Binary of 12 is 1100
@yogeshpanzade5572
@yogeshpanzade5572 4 жыл бұрын
9:45 12 = 1100
@CodeWithHarry
@CodeWithHarry 4 жыл бұрын
Correct the binary of 12 is 1100! Lots of love ❤✌
@yogeshpanzade5572
@yogeshpanzade5572 4 жыл бұрын
Thank u
@kairavgamit6354
@kairavgamit6354 4 жыл бұрын
Nice video...sir....make many series on this type of DSA sub. Vid. and hard prob. vids.👍🏻
@bamanevishwajeet
@bamanevishwajeet 4 жыл бұрын
Pleased harry bhai make this program in Python also.... Love you...
@RajeebLochanChand-b6b
@RajeebLochanChand-b6b Жыл бұрын
for case of 0 , we can just simply initialize the array to {0}
@nancy444-v6r
@nancy444-v6r 6 ай бұрын
9:33:- 12 ki binary value 1100 होती है।
@mahipalkumarwanika6053
@mahipalkumarwanika6053 2 жыл бұрын
Very nice sir Mahipal kumar
@blackmangamer9265
@blackmangamer9265 2 жыл бұрын
Thank you lot of 😀❤️
@hiphopm7069
@hiphopm7069 4 жыл бұрын
Sir jb mai aap ka c++, c ,ya java programming language dekhata hu to mere samjh me aata hai but pura nahi so aap daily ka 20 ya 40 minutes ka ek video uploaded kijiye
@monusinghrawat2911
@monusinghrawat2911 3 жыл бұрын
really great sir thank you so much.........
@everydayamazingofficial4615
@everydayamazingofficial4615 3 жыл бұрын
hii Harry, please make a video on number system including hexadecimal, octal number system. As soon as possible .
@yourkunal1662
@yourkunal1662 2 ай бұрын
9:40 1100 binary number of 12.
@ishasinha5087
@ishasinha5087 4 жыл бұрын
9:32 12-(1100)
@CodeWithHarry
@CodeWithHarry 4 жыл бұрын
Correct the binary of 12 is 1100! Lots of love ❤✌
@prajwalkklanjewar
@prajwalkklanjewar 4 жыл бұрын
Bhai is type ke conversion ke aur video banao Hamare concept bhi clear honge.
@monikasharma6631
@monikasharma6631 4 жыл бұрын
sir anyone is not genius than you you are are built computer sir
@jasmeetsingh8603
@jasmeetsingh8603 4 жыл бұрын
Thank You for Video!
@ishasinha5087
@ishasinha5087 4 жыл бұрын
Thnxx for this vdo😊😊
@NileshRaut6000
@NileshRaut6000 3 жыл бұрын
*HW* 9:43 -----> 1100
@umangkumar7373
@umangkumar7373 3 жыл бұрын
9:27 best
@alinamalhotra9895
@alinamalhotra9895 4 жыл бұрын
9:45 Binary of 12is 1100
@kiranshinde03
@kiranshinde03 3 жыл бұрын
(12) decimal ----> (1100) binary
@girijeshgothriwal1305
@girijeshgothriwal1305 4 жыл бұрын
Bhai, SQL pe bhi bana do kuchh.. KZbin pe bas basics hi hain.. aap python playlist jaise kuchh SQL me bhi bana do..
@techgourab
@techgourab 3 жыл бұрын
9:38 (12) :- 1100
@soumyadeepkarmakar5702
@soumyadeepkarmakar5702 4 жыл бұрын
plz make this video in hindi also. I am learining c language fromyour recent video on C.
@HimanshuKumar-ec2hc
@HimanshuKumar-ec2hc 3 жыл бұрын
thank you. very well explained.
@shubhamgupta3763
@shubhamgupta3763 4 жыл бұрын
9:44- 12 == 1100 in binary
@utkarshchandra8893
@utkarshchandra8893 4 жыл бұрын
Thank you sir ❤❤❤
@mayankmaurya3521
@mayankmaurya3521 4 жыл бұрын
Great video
@RohanDasRD
@RohanDasRD 4 жыл бұрын
Awesome bhai♥️
@khuntjenish2213
@khuntjenish2213 3 жыл бұрын
9:48 - 12 decimal to binary = 1100
@pratikgurav6778
@pratikgurav6778 4 жыл бұрын
Sir Maine abhi 10th pass kiya hain aur me aage computers me currier Karna chata hu ?)To me software development karu ya soft engineering ya aur koi options hain ?)to main konsi site choose karu aur pcb karu ya pcm karu Please reply me sir U r my role moddel
@drashtisahu2229
@drashtisahu2229 4 жыл бұрын
12 in Binary (9:35) = 1100
@soumyadeepkarmakar5702
@soumyadeepkarmakar5702 4 жыл бұрын
plz make a video on which field(example: app development, web developer , data scientist) in software engg. to get high salary job also can a btech in ECE get this job by his skills.plz make a full detailes video.
@mohitkwatra118
@mohitkwatra118 11 ай бұрын
[09:49] answer: 1100
@hrushikeshwaghmare7261
@hrushikeshwaghmare7261 4 жыл бұрын
You are great bro .
@pythonJs786
@pythonJs786 3 жыл бұрын
9:44 answer is 1100
@StatusWorld-bp2pq
@StatusWorld-bp2pq 4 жыл бұрын
Please make a video in how to run java script, phython ,java and c in together
@anilagarwal5022
@anilagarwal5022 4 жыл бұрын
9:45 Binary of 12 is ---->1100
@CodeWithHarry
@CodeWithHarry 4 жыл бұрын
Correct! Lots of love ❤✌
@anilagarwal5022
@anilagarwal5022 4 жыл бұрын
@@CodeWithHarry Thanks bro Aap se hi toh sikha hai 😉
@muhammadsameer9161
@muhammadsameer9161 4 жыл бұрын
9:45 decimal number into binary 12 = 1100
@CodeWithHarry
@CodeWithHarry 4 жыл бұрын
Correct! Lots of love ❤✌
@muhammadsameer9161
@muhammadsameer9161 4 жыл бұрын
@@CodeWithHarry thanks dear ❤️
@Acoustic_ash
@Acoustic_ash 3 жыл бұрын
9:46 12-> binary=1100
@sayakbhunia2903
@sayakbhunia2903 4 жыл бұрын
9:45 ans-1100
@CodeWithHarry
@CodeWithHarry 4 жыл бұрын
Correct the binary of 12 is 1100! Lots of love ❤✌
@murr4551
@murr4551 4 жыл бұрын
Sir , Please make a video on 'How to be a data scientist in 2020' full guidelines.....I am waiting for your instruction on this topic Sir. I have seen other KZbinrs video but they are not clear enough. I am 100% sure that your guidelines will be completely useful as it has always been. Thank you Sir.
@pythonenthusiast9292
@pythonenthusiast9292 4 жыл бұрын
Can you please do a live/recorded freelancer project for a software developer , like using python and django or according to the project requirements ?
@raseshshetty2386
@raseshshetty2386 4 жыл бұрын
python enthusiast but I don’t think anyone would get allowed by the project provider to do so...
@pythonenthusiast9292
@pythonenthusiast9292 4 жыл бұрын
@@raseshshetty2386 maybe.. i was curious as i saw few videos on solving live freelancer projects..I asked becoz his teaching style is unique and easy to understand. Still no worries if thats not possible.
@hiphopm7069
@hiphopm7069 4 жыл бұрын
Plz sir suru se steps by step sikhaye
@RokyBeastX
@RokyBeastX 4 жыл бұрын
Thanks Harry Bhai
@rasul_dude
@rasul_dude 4 жыл бұрын
Iss saal ki Advance Maths ki Pehli Chapter Binary Numbers 😅😅😅
@mahanaatma910
@mahanaatma910 4 жыл бұрын
9:30 binary form of 12 is 1100
@noorabdullah-dq2so
@noorabdullah-dq2so 9 ай бұрын
time: 9:47 Answer: 1100
@abhiaryan07
@abhiaryan07 4 жыл бұрын
Bhai which headphones do you use.? Please reply.....
@engineerbhai7642
@engineerbhai7642 4 жыл бұрын
You are great sir.
@manikanchanbera85
@manikanchanbera85 2 жыл бұрын
Decimal to binary conversion using bitwise operator (left shift) ka video bana dijiye plzz.
C Program to Reverse a Number
17:56
CodeWithHarry
Рет қаралды 91 М.
Special Programs in C − Binary to Decimal Conversion
7:40
Neso Academy
Рет қаралды 247 М.
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
37:51
bayGUYS
Рет қаралды 463 М.
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 31 МЛН
小路飞和小丑也太帅了#家庭#搞笑 #funny #小丑 #cosplay
00:13
家庭搞笑日记
Рет қаралды 17 МЛН
5 Mistakes Beginner Web Developers Make (Avoid These)
12:09
CodeWithHarry
Рет қаралды 25 М.
What Do Software Engineers Actually Do? (It’s Not What You Think)
13:07
31 - DECIMAL TO BINARY CONVERSION - C PROGRAMMING
15:06
Sundeep Saradhi Kanthety
Рет қаралды 127 М.
AI Meets Quantum: New Breakthrough Will Change Everything
15:50
Anastasi In Tech
Рет қаралды 74 М.
How I would learn to code (If I could start over)
13:14
CodeWithHarry
Рет қаралды 218 М.
Cybersecurity Q&A with Heath Adams
The Cyber Mentor
Рет қаралды 164
C Program to Find Prime Number
27:20
CodeWithHarry
Рет қаралды 148 М.
Asking Google and Amazon employees how they got hired
Tech Stories in 2 Minutes
Рет қаралды 4
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
37:51
bayGUYS
Рет қаралды 463 М.