# Converting numbers to binary

GHOSTRIDER2016
■■□□□□□□□□ Posts:

**35**Member ■■□□□□□□□□
Guys,

When it comes to converting numbers to binary i read that you keep dividing the number by 2 and any remainders just come out as 1 so imagine that the number 500 in binary is

500/2 = 250 = 0

250/2 = 125 = 0

125/2 = 62.5 = 1 (reminder)

62.5/2 = 31.2 =1

31.2/2 = 15 = 1

etc you keep dividing until you have no more numbers to divide and the number will be from bottom to top is this correct ?

Many thanks

When it comes to converting numbers to binary i read that you keep dividing the number by 2 and any remainders just come out as 1 so imagine that the number 500 in binary is

500/2 = 250 = 0

250/2 = 125 = 0

125/2 = 62.5 = 1 (reminder)

62.5/2 = 31.2 =1

31.2/2 = 15 = 1

etc you keep dividing until you have no more numbers to divide and the number will be from bottom to top is this correct ?

Many thanks

#### Welcome

We're proud to offer IT and security pros like you access to one of the largest IT and security certification forums on the web.

## Quick Links

#### Categories

- 109.9K All Categories
- 120 Welcome Center
- 20 Announcements
- 3 Forum Rules of Engagement
- 62 Introduce Yourself
- 34 TechExams Support
- 87.5K Certification Preparation
- 131 Check Point: CCSA & CCSE
- 32.8K Cisco
- 21.5K CCNA & CCENT
- 368 CCDA & CCDP
- 8.9K CCNP
- 1.7K CCIE
- 411 Cloud Certifications
- 154 Amazon Web Services (AWS)
- 7 Azure
- 103 CCSP
- 73 Cloud+ & Cloud Essentials
- 15.4K CompTIA
- 5K A+
- 223 CASP+
- 92 CySA+
- 970 Linux+
- 4.4K Network+
- 23 PenTest+
- 259 Project+
- 3.8K Security+
- 329 Server+
- 249 Other CompTIA Certifications
- 1.2K EC-Council
- 583 CHFI
- 600 CEH
- 1.3K GIAC
- 27 IAPP
- 958 ISACA
- 10 CRISC
- 264 CISA
- 670 CISM
- 4.2K (ISC)²
- 599 CISSP
- 32 CSSLP
- 3.6K SSCP
- 921 Juniper
- 720 LPI, Red Hat & Linux Foundation
- 18.5K Microsoft
- 135 MCSA 2016 / MCSE 2016
- 159 Windows 10 exams
- 139 Windows 8 exams
- 1.4K Windows 7 exams
- 1.6K MCSA / MCSE on Windows 2012 General
- 2.3K MCTS / MCITP on Windows 2008 General
- 828 Exchange Server & Office Communications Server Exams
- 528 Other Microsoft Electives
- 350 MCSA/MCSE: Security
- 300 Microsoft Developers Certifications
- 483 SQL Server exams
- 144 Offensive Security: OSCP & OSCE
- 2K Other Security Certifications
- 333 Virtualization Certifications
- 231 Citrix Certifications
- 95 VMware
- 1.9K Other Certifications
- 6 Business Analyst Certifications
- 387 CWNP Certifications
- 859 ITIL Certifications
- 212 Project Management Certifications
- 84 Apple Mac OS X Certifications
- 62 Novell Certification
- 81 Oracle Certifications
- 52 Sun Microsystems Java Certification
- 112 Storage Certifications
- 6.6K General Certification
- 17.6K Education & Development
- 35 Colleges & Schools
- 31 Educational Resources
- 17.5K IT Jobs / Degrees
- 34 Professional Development
- 85 Cybersecurity
- Forensics
- 1 Pentesting
- 4 Cloud Security & IoT
- 8 OWASP
- 28 Security Awareness & Training
- 31 Security News & Breaches
- 19.9K General
- 12 Conferences & Events
- 12 Computer Gaming
- 3 Data Center
- 42 Classifieds
- 26 For Sale
- 6 Wanted (ISO)
- 8 Help Wanted
- 11 Just for Fun
- 17.4K Off-Topic
- 9 Scripting
- 2 Show Us Your Tech!
- 7 Troubleshooting
- 2.4K Virtualization

## Comments

6Member ■□□□□□□□□□500/2 = 250, 500%2 = 0 -> 0

250/2 = 125, 250%2 = 0 -> 0

125/2 = 62, 125%2 = 1 -> 1

62/2 = 31, 62%2 = 0 -> 0

31/2 = 15, 31%2 = 1 -> 1

15/2 = 7, 15%2 = 1 -> 1

7/2 = 3, 7%2 = 1 -> 1

3/2 = 1, 3%2 = 1 -> 1

1/2 = 0, 1%2 = 1 -> 1

Now you take the numbers and work your way from bottom up, in this case 500(base10) is 111110100(base2).

If you think back to grade school before you knew what decimals and fractions were you were probably taught intger division with the R for remainder notation, it's the exact same concept here. You can _only_ have a remainder of 1 or 0 when dividing by 2 and that remainder is what gives you the value in the new base. I'm sorry if I am explaining this oddly, but it's much easier to just work through one or two. This works for other bases as well (e.g. you can convert a number from base 10 to base 8 by dividing by 8 and using the remainders for the new digits)

I guess the important thing is don't use 62.5 in your next operation, use 62. Don't look at 125/2 as 62.5 think of it as 62R1 and the R1 is what gives you the binary digit (or bit) for that field and 62 is what you bring forward (the next bit is a 0 since 62/2 = 31R0 which is where you went wrong).

543Member ■■■■□□□□□□Being math challenged, I'm having trouble following this. I learned a different way which makes sense, even with my trouble with numbers.

## 'My dear you are ugly, but tomorrow I shall be sober and you will still be ugly' Winston Churchil

2,705Mod Mod35Member ■■□□□□□□□□35Member ■■□□□□□□□□I got scared when

CryptrotTheWarlockposted this it was like wow my brain is about to blow up