I'm confused by your requirements.
According to the ISO 8859 table, the octal values 377, and 242 do not represent numerical characters, e.g. '0' through '9'. Thus using strtoul is out of the question to convert the 3 characters into one integral number.
The octal values 377, 242 and 242 represent 3 8-bit quantites or 24 bits total. This bit quantity is not a power of 2, so I guess you don't all the bits converted to binary. (Although 24 bits is common for describing color values).
Do you want the values to displayed as binary textual numbers, such as '11111111' for octal 377? If this is the case, use std::strtoul using 2 as the base.
Otherwise, please clarify your requirements or question. Give an example program fragment that shows what you want to achieve (pseudo code would work also).