Requirements difference between Yosemite and Sierra
Here are the general requirements as specified by Apple:
OS X Yosemite

OS X Yosemite - Technical Specifications
General Requirements OS X
v10.6.8 or later
2GB of memory
8GB of available storage
Some features require an Apple ID; terms apply.
Some features require a compatible
Internet service provider; fees may apply.

macOS Sierra

MacOS Sierra - Technical Specifications
General Requirements
OS X 10.7.5 or later
2GB of memory
8.8GB of available storage
Some features require an Apple ID; terms apply.
Some features require a compatible Internet service provider; fees may apply.