Where "Sub Bass" actually is, is a bit miffed, some people say its between 30-200hz, some say its between 20-90, some 25-100, and so on and so on.. So lets to not get into an arguement you're going to be looking at building sub bass what sits between to band of 40hz-100hz (taking into consideration not EVERY system in the world will be hitting below 40 and anything above 100 'might' not have a good enough punch)
So first things first, load up your favourite synth what has the option of a Sine wave oscilator. Popular synths for meaty subs include.
Native Instrument's - Massive
Image-Line's - 3oscx
Rob Papen's - Albino*
Logic's - EXS24
Reason - Subtraktor or Malstrom
But like I said, anything with a sine wave oscilator will do !
*Within albino if you click Diverse Sounds, then click the presets and select "Z-Initial-preset" then switch the first oscilator to digital, you will have a sine wave, you may want to move the slider all the way left.
Run one oscilator only (sine wave) and now play C2, you have sub bass! (Woo!) but if you're working on a qwerty keyboard or a small midi keyboard, turn your pitch down 24 semi-tones on your synth and play C4 - What this means is that you're making your synth play the note 2 octave (24 notes) below what it would be normally, so you can play notes higher up the keyboard so people like me, who use a qwerty keyboard to play their notes don't have to click the deep notes in

Its really that simple! Now you have the option of adding attack and release to your sub, do you want your sub to slowly raise to its peak? or slowly trickle out of every note its played? You can do this simpley by finding your synths Amp Evelope. (In simple terms, thats the Attack, Decay, Sustain and Release settings)
For Massive, it is the forth blue botton what says ENV (its called 4 ENV)
For 3oscx, Click the "INS" button.
For Albino3, It is the A on the third left column.
Now you've found it play with the settings till you find something you like!
So now lets look at this chart.
http://www.phys.unsw.edu.au/jw/graphics/notes.GIF
So working from that table, we "should" be working between the notes E1 and A2 so nearly an octave and a half of notes thats plenty so the next step is to write your bassline. The thing to remember about writing sub basslines is keep space, while we'd all love to have booming subs for 5 minutes, its very tiresome to the space and drive of your track to not give the sub as well as the dancefloor's chest time to breathe.
So lets put this into context a way everyone can understand via pictures!



Now I am not saying either is better than the other nor they're good or bad basslines but in terms of space, the first and second picture have the most space so in turn will open up endless possiblities of how you can excite people with sounds what're not sub bass, hence forth making you think about more than just a bassline!
So the next step is the low pass filter, since the notes I am playing are F, G# and D# we need to find the frequency what fits those best to place our filter at by looking at that chart I showed you, I am going to be looking at putting my cut off filter between 38hz and 51hz so next to set your frequecy knob to 38 and work your way up in increments of one, till you find the most booming part, between the 3 notes (I have worked this out at about 45-46hz).
So now all that is left is turn your sub down to a decent level, add some limiting. (if you want all the notes to be the same level) and then write the rest of your track!
Thanks for reading and please tell me if this was helpful!
----------------------------------
Further watching