Usually the cash register also prints a receipt for the customer.
Usually the drawer can be opened only after recording a sale, except when using a special key, which only senior personnel or the owner has. This reduces the risk of personnel stealing from the shop owner by not recording a sale and pocketing the money, in the case that the customer does not require a receipt and has to be given change (cash is more easily checked against recorded sales than inventory). In fact, cash registers were first invented for the purpose of eliminating employee theft or embezzlement. The first registers were entirely mechanical, without receipts. The employee was required to ring up every transaction on the register, and when the total key was pushed, the drawer opened and a bell would ring, alerting the manager to a sale taking place. Those original machines were nothing but simple adding machines.
A cash register may be compulsory for tax purposes. The law sometimes also requires customers to collect the receipt and keep it at least for a short while after leaving the shop, again for checking that the shop records sales, so that it can not evade taxes.
Often cash registers are attached to scales, barcode scanners, checkstands, and EFTPOS or credit card terminals. Increasingly, dedicated cash registers are being replaced with general purpose computers with POS software.
Today, these machines scan the barcode (usually EAN or Universal Product Code (UPC)) for each item, retrieve the price from a database, calculate deductions for items on sale, calculate the tax, calculate differential rates for preferred customers, time and date stamp the transaction, record the transaction in detail including each item purchased, record the method of payment, keep totals for each product or type of product sold as well as total sales for specified periods, and do other tasks as well.
Some supermarkets have introduced self-checkout machines, where the customer is trusted (to an extent) to scan the barcodes (or manually identify uncoded items like fruit), and place the items into a bagging area (where the bag is weighed, the machine complains vocally when it thinks that something in the bag doesn't seem to weigh what the inventory database lists the weight as). There is normally a supervisor watching over several such checkouts; as such the benefit to the customer is little, the benefit to the supermarket is reduced staffing levels. Payment on these machines is accepted by card EFTPOS, or cash via coinslot and bank note scanner.