This answer was taken from Yahoo! Answer at https://au.answers.yahoo.com/question/index?qid=20090606004858AAb5Vyf
Answer 1: Normally the teachers/examiners will give out pencils for testing. But in my experience, HB is the average pencil used. But If you are still unsure what to bring, get both pencils for just in case.
2B and HB have different leads inside the pencil. 2B is fairly light while HB is mediocre. Get a piece of paper and scribble and shade a bit of it on one side with one pencil and do the same with the other and you can easily compare what is lighter or darker. The rule of thumb is that the bigger the number on the “B” pencils, the darker they are. e.i. look at a 6B pencil for example. They are very dark.
Answer 2: Pencil lead is made of graphite (a form of carbon) and clay. The hardness is adjusted by different composition of the two. More graphite means softer pencil. More clay means harder pencil.
2B is soft
HB is medium hard
2H is hard
2B is darker, easily smear hence messier. HB is more likely to leave an indentation on the paper and harder to erase.
Graphite conducts electricity. Many years ago when automated scoring of multiple choice tests was first introduced, the answer sheet reader actually read the sheet electrically by detecting the presence of graphite on the paper. Back then 2B pencils was standard for testing because more graphite means better reading.
Nowadays, optical sensor is so cheap and it is probably more accurate than electrical sensor. The conducting property of graphite is probably not a concern anymore. Since the blackness and reflective attribute of 2B and HB pencils are different, which to use really depends on how the optical reader is calibrated to use. So you should follow the instructions on the answer sheet in order to minimize the misreading of your answers. When in doubt, bring both.
Answer 3: The 2b and HB refer to the hardness of the lead/graphite which changes the reflectiveness(scaner tests) and the color HB is a standard #2 pencil 2B is harder which is darker. If it is a standard test like sats acts then use the HB unless otherwise directed (bring both )
That is the reason why we need 2B pencil when sitting for UPSR, PMR, SPM and STPM exam in Malaysia.