Intel Corporation
3.8 of 5 3,268 reviews
www.intel.com Santa Clara, CA 5000+ Employees

Intel Corporation Post Silicon Validation Engineer Interview Question

I interviewed in Folsom, CA and was asked:
"Convert a decimal number into binary form."
Add Tags [?]
Answer Flag Question

Part of a Post Silicon Validation Engineer Interview Review - one of 1,262 Intel Corporation Interview Reviews

Answers & Comments

0
of 0
votes
If you are not very familiar with the powers of 2, you can write them down, from left to right, before starting the process. eg. 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1

Find the largest power of 2 that is less than the decimal number, then:

1 - write a '1' for that power-of-2's column
2 - subtract that power-of-2 from the number and keep the remainder
3 - check next lower power-of-2 to see if it is less than the remainder
4 - if no write a '0' for that power-of-2's place and goto step 3
5 - if yes, goto step 1

Example:
Starting with the decimal number 209, the largest power-of-2 that is less than 209 is 128. We write a '1' and subtract 128 from 209 leaving 81. The next smaller power-of-2 is 64. 64 is less than 81 so we write a '1', subtract 64 from 81 leaving a remainder of 17. We then check 32 and write a '0', check 16 and write a '1', leaving a remainder of 1. Next is 8, then 4, then 2, taking a '0' for each leaving a '1' for 1. Putting all this together yields a solution of '11010001' binary, which is 0xD1 (hex) and 209 decimal.
I hope this helps.
- JimmyT on Sep 03, 2013 Flag Response

To comment on this question, Sign In with Facebook or Sign Up


Intel Corporation – Why Work for Us?

As the world leader in silicon innovation, Intel develops technologies, products and initiatives to continually advance how people work and live. Our world is filled with 41,000 engineers bent on turning science… Full Overview

Provided by employer [?]

Tags are like keywords, helping to categorise interview questions that have something in common.

Glassdoor is your free inside look at Intel Corporation interview questions and advice. All interview reviews are posted anonymously by Intel Corporation employees and interview candidates.