A little XS 400 terminology that will help us all to be on the same page.
First of all, Yamaha made several different motorcycles with (nominal) 400cc displacement, so specifying XS 400 helps us all to know we are on the same page. Second, Yamaha specified models of XS400 with a letter after the "XS 400" and these roughly followed model years. For instance, a 1977 is an XS 400 D. A 1978 is an XS 400 E. A 1979 is an XS 400 F. A 1980 is an XS 400 G or SG (more on that in a moment). This will be important to know when it comes time to buy parts.
As far model years, keep in mind that date of manufacture only tells you so much and not the whole story. For instance, right now I can go down to a dealership and buy 2012 Chevy truck. Of course, it was not manufactured in 2012, it's a 2012 nonetheless. It's the same with motorcycles. If it was made in 12/79, or probably 11/79 or 10/79, it's an '80 model year and an XS 400 G or SG.
Ah yes, back to the G or SG (on '81s, H or SH). In '80 and '81, there was an XS 400 "Special". That's what the "S" stands for in XS 400 SG or XS 400 SH. The Specials were the economy models with spoked wheels, drum brakes front and back and what elsem I don't know. There was a similar economy/standard model thing earlier, but there the number "2" was used as in XS 400 2E or XS 400 2F.
Here's the fun part- no matter whether an SG, a G, an H, an SH an F or a 2F, the engines were essentially the same. Stick with a SOHC (single over-head cam) XS 400, and most of the parts interchange. Therefore, as Drewpy mentioned earlier, all SOHC XS400 motorcycles had Mikuni BS 34 carbs, though the jets were different with different years- more good news- jets are plentiful and inexpensive.
One last thing to be aware of- Yamaha started selling double over-head cam (DOHC) XS400 models in 1982 and virtually nothing interchanges to the older SOHC models....however, Yamaha did make ye olde SOHC XS400 one last year in 1982, so there was one year of overlap.