MindFill - Brian Carroll's Blog

Do While (WhatYouKnow) < (WhatYouKnow + 1)

Should programmers be able to convert from decimal to binary?

When I'm interviewing candidates for a development position I typically write a number down and ask them to convert it from decimal to binary.  Of course this is a very minor factor in the interview, but I find it interesting to see their responses.  It amazes that onle one person out of the last twenty five or thirty candidates I've interviewed has been able to convert from decimal 45 to binary 00101101.  (He also proudly did the hex conversion to 2D without missing a beat.)  Most of these candidates have CS degrees and 5+ years of experience, but from the looks on their faces when asked this question, they either never learned or have forgotten one of the most fundamental concepts of computing. 

Not only is it fundamental, it's also a simple concept.  My 9 and 10 year old sons can do these conversions.  They can do all combinations of decimal/binary/hex conversions.  They think the binary system is the coolest because they can count to 1024 on their fingers.  Thankfully I waited until after they were 4 to teach them.  I could see it now...“Hi Sweetie....how old are you?“ and them showing a binary 4 on their fingers!

So, would the developers you work with be able to do these conversions (without a calculator) or would they go completely blank like my job candidates have been doing lately?

Comments

Eric Maino said:

At least when they reach the age of 36, 68, or 100 they can still use the 4 trick :-)
# June 5, 2004 2:06 AM

Mikhail Arkhipov (MSFT) said:

Actually, they also should be able to write *code* that converts decimal to binary. Next question: write code that converts decimal to any radix. Next question: modify it to convert number in one random radix to a number in another random radix within reasonable limits.
# June 5, 2004 2:34 AM

ben said:

you should of asked them to think about how they would code it, the long division algorithm is pretty intuitive
# June 5, 2004 2:36 AM

Stijn Gysemans said:

@ school we even learn how to write that algorithm in assembler :-)
# June 5, 2004 7:22 AM

denny said:

how bout this as a bonus answer:

45 do you want 45 in binary or the char values "4" and "5" in binary?

different problem with different answers....

thats the first thing I would ask given the question as I read it.
# June 5, 2004 10:16 AM

Drew said:

Depends on what they'll be coding. I'd bet that for most jobs, this isn't useful knowledge. Requiring nervous candidates to remember how to do it almost borders on hazing (like forcing hams to learn morse code).
I can't imagine having a CS degree (I do) and not being able to do the conversion quickly in my head (I did), though.
# June 5, 2004 3:56 PM

Greag said:

It proves how big a fool you are asking such a question!

You deserve a hit on head with a scientific calculater, not a programmer.

# September 18, 2007 8:03 AM

Tom said:

I'm pretty sure asking other questions will get you a better condidate.  Anybody with a CS degree should be able to think and leave the calculations to computers.

# October 15, 2007 11:40 AM

JonMorg said:

I completely agree that the programmer needs to know how to decode numbers into bin/hex/dec. The person is writing for computers. It is hazing only if he mocks the person for doing so. As part of an extensive candidate, yes, i agree it is a small part, but the basics are basics for a reason. Because everything builds from them

# March 30, 2008 3:24 PM

TURHIG said:

I hate binary and and having to convert it into decimal. It's annoying and really hard..

# February 22, 2009 3:32 AM

Point said:

This would list in the top 100 Stupid interview questions.

Any by the way.. The more you learn the less you know.

# December 31, 2009 11:31 AM

Digmamlinny said:

Urteter nuytre: http://famuk.szm.com

# January 21, 2011 10:55 PM

Digmamlinny said:

# January 24, 2011 1:53 AM

Digmamlinny said:

скачать mp3 в стиле house    

downmerpost.prv.pl/ievw.html  сквозные ранения скачать

# January 30, 2011 4:23 PM

Digmamlinny said:

скачать sound drivers для xp      

downthyeageo.prv.pl/cmgj.html

# January 31, 2011 12:54 AM

Digmamlinny said:

скачать mp3 на телефон justin timberlake      

<a href=downpaddmelg.prv.pl/irng.html>%D1%82%D0%B5%D0%BE%D1%80%D0%B8%D1%8F оптимизации скачать</a>

# January 31, 2011 1:25 AM

Digmamlinny said:

скачать crack ocr - finereader      

<a href=downsurphyl.prv.pl/dxoy.html>%D1%81%D0%BA%D0%B0%D1%87%D0%B0%D1%82%D1%8C u-net 3.0</a>

# January 31, 2011 6:38 AM

Digmamlinny said:

толковый словарь французский скачать      

downelflam.prv.pl/ryis.html

# January 31, 2011 7:12 AM

Digmamlinny said:

скачать winamp 2.95      

downasun.prv.pl/aagv.html

# January 31, 2011 4:35 PM

Digmamlinny said:

скачать crack для windows vista 6.0.5600 build 5600      

downinter.prv.pl/dxqg.html

# January 31, 2011 10:15 PM

Digmamlinny said:

скачать 99 имен аллаха      

downflutre.prv.pl/xgsf.html

# February 1, 2011 5:14 AM

Digmamlinny said:

скачать электронная библиотечная программа      

downmerpost.prv.pl/ofbc.html

# February 1, 2011 8:45 AM

weblogs.asp.net said:

149044.. Great idea :)

# May 18, 2011 11:30 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)