+ Reply to Thread
Results 1 to 5 of 5
  1. Member
    Join Date
    Nov 2016
    Posts
    35
    #1

    Default Converting a number to octal ?

    Can someone please share with me a simple way of converting a number to octal ? my brain is getting frazzled over these number conversations

    Thanks
    Reply With Quote Quote  

  2. SS -->
  3. Senior Member
    Join Date
    Sep 2016
    Location
    VA
    Posts
    380

    Certifications
    CISSP, PMP, CCNP, FITSP-M
    #2
    It's multiplying times 8. The range runs from 0 through 7

    0 = 0
    1 = 1
    7 = 7
    10 = 8
    11 (8+1) = 9
    12 (8+2) = 10
    17 (8+7) = 15
    20 = 16
    30 = 24
    40 = 32
    100 = 64
    Reply With Quote Quote  

  4. Junior Member Registered Member CryptrotTheWarlock's Avatar
    Join Date
    Nov 2016
    Posts
    6

    Certifications
    Security+
    #3
    Hey there! I remember you asking about decimal (base10) to binary (base2). The same method can be used for decimal (base10) to octal (base. The poster above gave you octal (base to decimal (base 10).

    Anyway we are going to use the same number from your binary (500(base10)) to demonstrate conversion to Octal.

    As a reminder / is integer division, % is modulus which gives you the remainder (which is the octal digit for that position)

    500 / 8 = 62. 500 % 8 = 4 -> 4
    62 / 8 = 7. 62 % 8 = 6 -> 6
    7 / 8 = 0. 7 % 8 = 7 -> 7

    Now we go from the bottom to the top and find that 500(base10) is 764(base.

    The process is the same from base10 to any lower base.
    Reply With Quote Quote  

  5. Junior Member Registered Member CryptrotTheWarlock's Avatar
    Join Date
    Nov 2016
    Posts
    6

    Certifications
    Security+
    #4
    I can't edit my post to turn off BB Smilies. (base == ( base8 )
    Reply With Quote Quote  

  6. Member
    Join Date
    Nov 2016
    Posts
    35
    #5
    Thankyou
    Quote Originally Posted by CryptrotTheWarlock View Post
    Hey there! I remember you asking about decimal (base10) to binary (base2). The same method can be used for decimal (base10) to octal (base. The poster above gave you octal (base to decimal (base 10).

    Anyway we are going to use the same number from your binary (500(base10)) to demonstrate conversion to Octal.

    As a reminder / is integer division, % is modulus which gives you the remainder (which is the octal digit for that position)

    500 / 8 = 62. 500 % 8 = 4 -> 4
    62 / 8 = 7. 62 % 8 = 6 -> 6
    7 / 8 = 0. 7 % 8 = 7 -> 7

    Now we go from the bottom to the top and find that 500(base10) is 764(base.

    The process is the same from base10 to any lower base.
    Reply With Quote Quote  

+ Reply to Thread

Social Networking & Bookmarks