Despite slimmed-down plans to increase the number of service personnel north of the border, David Cameron highlighted "Scotland's continued vital role in our defence".
The number of military personnel in Scotland will still increase to its highest level since 2007, the Prime Minister said.
The Conservative leader hit back at claims from First Minister Alex Salmond that the UK Government had broken its commitment to the people of Scotland.
At the same time, Downing Street said Scots deserved to know what military capability the country would have if it left the UK and became independent.
A Downing Street spokesman said: "We have yet to see credible projections, including any put forward by the Scottish Government, which would maintain a military presence in an independent Scotland on the same scale as the plans we have set out.
"People in Scotland deserve to know what military capabilities they would plan for an independent Scotland and how these could be afforded on the proposed budget of around 7% of what the UK spends on defence and security."
Meanwhile, in a letter to Mr Salmond, the Prime Minister said it was "important for the referendum debate for people to understand that the outcome you seek for Scotland is the end of centuries of our shared British military effort, and the footprint of this military capability in Scotland".
That came in reply to a strongly-worded letter from Mr Salmond in which he claimed the UK Government's bond of trust with Scots had been damaged by the slimming-down of plans to increase soldier numbers north of the border.
Defence Secretary Philip Hammond announced last week the number of Armed Forces personnel in Scotland will increase by about 600, far fewer than was promised two years ago.
The then defence secretary Liam Fox had pledged in 2011 that the size of the Army in Scotland would increase from about 3,500 to 8,500.
He had also outlined a proposal for a new base in Kirknewton, near Edinburgh, which has now been ditched.
The changes mean the Army's presence in Scotland will grow to about 4,000 by 2020.
Mr Salmond accused the UK Government of having "shamefully" disregarded "clear promises to Scotland that were made less than two years ago".
The First Minister also demanded Mr Cameron "now apologise for the breaking of those commitments to the people of Scotland".
In his reply, Mr Cameron accepted there had "indeed been changes to what was originally envisaged in July 2011".
But he said those were "driven by changes to circumstances and operational concepts, not by any lessening of commitment to Scotland's vitally important contribution to our collective security".
The Prime Minister said Scotland would be one of the Army's "seven 'centres of gravity'", adding that numbers would increase by about a quarter on July 2011 levels, with significant concentrations of troops at Leuchars in Fife, as well as Edinburgh and other sites in Scotland.
He added: "What this means for Scotland is that total military personnel numbers are set to increase to their highest levels since 2007, before the financial crash, at a time when we're planning for smaller armed forces overall.
"Scotland will be home to one of the UK's three main naval bases and to one of its three main fast jet operating bases.
"There will be around £100 million of additional investment in Scotland.
"This builds on the £140 million the Ministry of Defence spends on average annually to maintain the defence estate in Scotland, some £85 million to develop Lossiemouth as an RAF Main Operating Base for Typhoon and the hundreds of millions of pounds of planned future investment in Faslane.
"These are all visible signs of our commitment to Scotland and to Scotland's continued vital role in our defence."
Mr Cameron stressed that "despite the fiscal challenges, the UK has the fourth largest defence budget in the world" and insisted: "Scotland benefits greatly from being part of this."
He also said the planned number of armed forces in Scotland would still be proportionate to the country's population.
A spokesman for the First Minister said: "The reality is that Scotland was promised 6,000 additional forces personnel and we have ended up with just 600 more.
"That is a pale shadow of what was committed to by the UK Government just two years ago.
"This continues the disproportionate cuts to the defence footprint in Scotland by successive UK governments which has now seen a fall of over a third in numbers of personnel between 2000 and 2012, compared to under a fifth UK-wide. And the plans announced by the UK Government last week leave Scotland with fewer defence personnel than Finland, Denmark or Norway."
Mr Salmond's spokesman added: "We are committed to a defence budget for an independent Scotland which is around £500 million more than is currently spent on defence here by the UK Government.
"This will ensure we have first-class conventional forces which meet our needs, including the retention of defence bases inherited at the point of independence - but we will save money by not spending on Trident weapons of mass destruction."