4 bytes for integer

4 bytes integer
is integer 4 bytes because 4 sets of 0's and 1's

what is math to turn 1025 into
00000000 00000000 00000100 00000001
LVL 1
rgb192Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TommySzalapskiCommented:
Yes. Each "set" of eight 1s and 0s is a byte. There are 4 bytes to an integer (on your system, it varies).

The 0s and 1s are binary. The farthest right digit is the 1s place then the 2s, 4s, 8s 16s (doubles each time)
So the first 1 is in the 1024 place and the last 1 is in the 1 place 1024+1 = 1025
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TommySzalapskiCommented:
Maybe this would help? Very simple and has examples.
http://www.is.wayne.edu/OLMT/BINARY/PAGE3.HTM
0
ozoCommented:
1*2*2*2*2*2*2*2*2*2*2+
0*2*2*2*2*2*2*2*2*2+
0*2*2*2*2*2*2*2*2+
0*2*2*2*2*2*2*2+
0*2*2*2*2*2*2+
0*2*2*2*2*2+
0*2*2*2*2+
0*2*2*2+
0*2*2+
0*2+
1=
1025
0
rgb192Author Commented:
Thank you for answering and clarifying
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming Theory

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.