hub it is worked in only physical layer and sends data in the form of bit and it broadcast the data to connected all of hub. and switch it is only working in data link layer.and it sends the in the form of frames and it sends data in multicasting and unicasting for a particular device.