Sometime in the middle of November, the federal government will not have enough cash to pay all the country's bills.

That's what the Bipartisan Policy Center projects based on the Treasury Department's daily cash flow estimates and the bills coming due. It expects that the cash crunch would start between November 10 and November 19.

So Congress has a mere few weeks to raise the debt ceiling, which is the legal limit on federal borrowing. If it doesn't act in time, Treasury could end up defaulting on roughly a third of its legal obligations in November -- or roughly $70 billion.

Treasury would be forced to make chaotic, legally questionable and technically difficult calculations about who gets paid on time, and who doesn't. Every month it pays 100 million bills, most of them automated.

What robbing Paul to pay Peter could look like

Here's an illustration of the choices Treasury could have to make between November 10 and November 30.

How much we'll owe: $218 billion

How much we'll have coming in: $147 billion

Pay these bills: Bondholders ($30 billion); Medicare/Medicaid ($45 billion); Social Security beneficiaries ($42 billion); active and retired military ($3 billion); defense contractors ($17 billion); food stamps, unemployment, temporary assistance for needy families and housing programs ($12 billion).

Delay $71 billion in payments: IRS tax refunds ($3 billion), education programs ($7 billion), federal salaries and benefits ($12 billion), health and human services grants ($6 billion), and payments ($43 billion) to assorted agencies, including the FBI and federal courts, the Federal Highway Administration for road construction, the Federal Aviation Administration for air control, FEMA and the National Flood Insurance Program.

The longer lawmakers wait, the longer the payment delays

Instead of choosing who to pay, Treasury could decide to not pay any bills on a given day until it has sufficient cash. In other words, if it owes $20 billion one day, but only has $15 billion, it will wait to pay those bills until the remaining $5 billion comes in.

But the length of those delays would snowball as the bills pile up.

One potential scenario: Social Security benefits due on November 10 might not get paid for seven days. Those due on November 18 might take nine days. And those due on November 25 might take two weeks.

Even a delay of a day or two could be a hardship for low-income retirees. A week or more could be crushing for some.

Bondholders may get priority but they still may see delays

The expectation is that Treasury will do all it can to pay interest on the country's debt first, since the country's word as a borrower has long been gold. And it helps that interest payments are made from a separate computer system than all other Treasury payments.

But the longer lawmakers delay action on the debt ceiling past November 10, the dicier even that proposition may become.

Related: 7 things you need to know about the debt ceiling (yes, that again)

Take November 16, for example. That's when the United States will owe $30 billion in interest on Treasury securities, plus another $15 billion in other bills including military pay and Medicaid payments to states.

Problem is, only $27 billion will be coming into Treasury that day -- not enough to meet even the bond payments let alone other bills, according to BPC's projections.

So if Treasury has no extra cash to supplement that $27 billion in revenue, some bondholders may not be paid on time.

To avoid that fate, Treasury may try to simply squirrel away cash to make all its interest payments. But that would mean delaying payments on even more bills.

Or there's another option: Congress could deal with the debt ceiling issue well before November 10.