A barcode is an optical, machine-readable representation of data, used primarily for product identification and inventory management. Its development began in 1948 with Bernard Silver and Norman Woodland's initial patent in 1952, evolving into various types, including the Universal Product Code (UPC), which became widely used in retail after 1974. Barcodes function by using patterns of black and white lines to encode information, and numerous formats exist for diverse applications across multiple industries.