If what you are asking is to find the parent of a content type (such as thru code or such).
A content type's ID shows inheretance. This is based on string concatenation with '00' as the seperator. This is generally in the form '0x[baseID]00[GUID (new id)]00[and so on]'.
An example, the ID of the built in content type Item is 0x01, when inheriting from it, an example custom content type (from the project that happens to be open on my screen) would be 0x01006bf4134e9d7441eda5190264be3c4487.
You will notice the custom content type ID starts with the ID for Item (0x01) followed by the '00' seperator and then the GUID assigned to this content type.
To find the parent of any content type, all that is needed is to split that content types ID on the seperator '00' and examine the inheritance chain.
If instead, what you are asking is if, when creating a content type, do you have to know the content type of the parent when constructing a new ID for the new content type. Then yes, you do have to know it.
There may be tools to help you. Particularly, if working in Visual Studio 2010 the Content Type template prompts for the parent content type and generates an ID for you.
sts-adm and PowerShell are your best bet if you don't have a development tool to look it up automatically. Here is a PowerShell script to get you the IDs of all content types on a site.
$site = Get-SPSite [url of your site]
$web = $site.RootWeb
ForEach($ctype in $web.ContentTypes){write-host $ctype.Name": "$ctype.ID}