Nowadays it’s hard to explain to some people that “rights,” as that term was understood by the Founding Fathers, are not granted by governments. They exist prior to government, and governments have no legitimate jurisdiction to take them away, except in cases where it is a necessary response to misbehavior, or where it is necessary to sustain the community. Thus, liberty may be restrained to protect the public against aggressive behavior, and taxes can be levied to sustain the government operations to which the people have given express or tacit consent.
But rights were in no way considered to have been created by the Bill of Rights. Rather they were placed in the Constitution as a reminder to future federal legislators that there are lines that may not be crossed.
Let us use as our example the Second Amendment, which recent tragedy has brought to the forefront of the national consciousness:
“A well regulated Militia, being necessary to the security of a free State, the right of the people to keep and bear Arms, shall not be infringed.” 
Notice that the amendment doesn’t say that the people shall have the right to keep and bear arms. It says that “the right of the people to keep and bear Arms, shall not be infringed.” (Emphasis mine.) The amendment is referring to a pre-existing right. It is not creating a right, but protecting one. But what is the right to keep and bear arms?
In his Commentaries on the Laws of England, first published between 1765 and 1769, Sir William Blackstone wrote about what he called “the absolute rights of individuals” by which he meant those rights “which are so in their primary and strictest sense; such as would belong to their persons merely in a state of nature, and which every man is entitled to enjoy whether out of society or in it.”  Now by the time of the enactment of the Constitution, Blackstone had become recognized as the principal expositor of the common law of England, which the United States has inherited in all but one state, and which is specifically mentioned in the Seventh Amendment. 
Blackstone broke down the absolute rights as personal security (including life), liberty, and property. The Constitution reflects this breakdown of rights in the Fifth and Fourteenth Amendments, protecting the “life, liberty, or property” of persons against predation.   After discussing and breaking down these absolute rights, Blackstone went on to say,
“But in vain would these rights be declared, ascertained, and protected by the dead letter of the laws, if the constitution had provided no other method to secure their actual enjoyment. It has therefore established certain other auxiliary subordinate rights of the subject, which serve principally as barriers to protect and maintain inviolate the three great and primary rights, of personal security, personal liberty, and private property.”
He listed five such auxiliary rights, and the fifth is pertinent to this discussion:
“The fifth and last auxiliary right of the subject, that I shall at present mention, is that of having arms for their defense, suitable to their condition and degree, and such as are allowed by law. Which is…indeed a public allowance, under due restrictions, of the natural right of resistance and self-preservation, when the sanctions of society and laws are found insufficient to restrain the violence of oppression.”
In a word, Blackstone considered it a right to have arms for purposes of self-defense. This right was specifically mentioned in the English Bill of Rights of 1689 (though it was there restricted to Protestants), one hundred two years prior to the ratification of the American Bill of Rights.  And this is the right that was codified in the Second Amendment (though, of course, in the American version, the right wasn’t restricted to Protestants). The framers of the Second Amendment did not think that they were creating a right to keep and bear arms, but they referred to “the” right to keep and bear arms, meaning a right they deemed to exist prior to the enactment of the Constitution.
While this would certainly protect the possession of limited capacity handguns and shotguns for home defense, there is nothing that would keep the government from prohibiting the possession of large capacity, semiautomatic rifles, which are not necessary for self-defense, and have found their chief civilian application in school shootings.
It might be argued that the Second Amendment specifically mentions the “militia,” and, therefore, protects the right to own and possess the standard issue military rifle. But this wouldn’t protect possession of an AR-15, which is a semiautomatic rifle, so much as it would protect ownership and possession of the selective-fire M-16, which is the actual military rifle. There are few voices around calling for the legal possession by civilians of a rifle capable of fully automatic fire.
Moreover, while the Supreme Court’s 2008 decision in District of Columbia v. Heller acknowledged that it is likely that the Framers of the Second Amendment intended the preservation of the state militias that existed at the time (but have since disappeared in their original form), the Court also pointed out that the prefatory clause regarding the militia did not limit or expand the substance of the right.  At the time of the ratification of the Second Amendment, military and civilian firearms would have been substantially similar, which is obviously not the case today. So it would have been reasonable to state the maintenance of state militias as the basis for ensuring the preservation of the right to bear arms.
Things have changed since then, and there is no longer a question of requiring men of a certain age to enroll in the militia, and to keep a musket, complete with periodic musters. But the actual right, the right mentioned in the operative clause of the Second Amendment, the clause that protects the right to keep and bear arms, remains unchanged. And that is the right to possess weapons for self-defense; a function for which an AR-15, or any other rifle capable of receiving a high-capacity magazine, is entirely unnecessary.
So there is nothing in the Second Amendment that prohibits the government to ban the civilian ownership and possession of so-called “assault weapons.” That’s good news, because these weapons present a serious public danger, particularly, as it turns out, to the young.